Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic_graph_bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
dynamic_graph_bridge
Commits
5f6b95f4
Commit
5f6b95f4
authored
1 year ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Fix the way the test library is build and the Path in launch files.
parent
9089b48b
No related branches found
No related tags found
No related merge requests found
Pipeline
#31146
failed
1 year ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/CMakeLists.txt
+2
-6
2 additions, 6 deletions
tests/CMakeLists.txt
tests/launch/launching_test_sot_loader.py
+5
-6
5 additions, 6 deletions
tests/launch/launching_test_sot_loader.py
tests/launch/launching_test_sot_loader_basic.py
+10
-8
10 additions, 8 deletions
tests/launch/launching_test_sot_loader_basic.py
with
17 additions
and
20 deletions
tests/CMakeLists.txt
+
2
−
6
View file @
5f6b95f4
...
@@ -14,7 +14,6 @@ if(BUILD_TESTING)
...
@@ -14,7 +14,6 @@ if(BUILD_TESTING)
add_library
(
impl_test_sot_mock_device SHARED impl_test_sot_mock_device.cpp
)
add_library
(
impl_test_sot_mock_device SHARED impl_test_sot_mock_device.cpp
)
set_target_properties
(
impl_test_sot_mock_device PROPERTIES INSTALL_RPATH
set_target_properties
(
impl_test_sot_mock_device PROPERTIES INSTALL_RPATH
$ORIGIN
)
$ORIGIN
)
# target_include_directories(impl_test_sot_mock_device PUBLIC include)
target_link_libraries
(
target_link_libraries
(
impl_test_sot_mock_device PUBLIC sot-core::sot-core
impl_test_sot_mock_device PUBLIC sot-core::sot-core
dynamic-graph-python::dynamic-graph-python
)
dynamic-graph-python::dynamic-graph-python
)
...
@@ -32,15 +31,12 @@ if(BUILD_TESTING)
...
@@ -32,15 +31,12 @@ if(BUILD_TESTING)
dynamic_graph_bridge-impl_test_sot_mock_device-wrap SOURCE_PYTHON_MODULE
dynamic_graph_bridge-impl_test_sot_mock_device-wrap SOURCE_PYTHON_MODULE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/impl_test_sot_mock_device-python-module-py.cc"
)
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/impl_test_sot_mock_device-python-module-py.cc"
)
install
(
TARGETS
${
plugin_library_name
}
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION
${
DYNAMIC_GRAPH_PLUGINDIR
}
)
# Library for sot_external_interface
# Library for sot_external_interface
add_library
(
impl_test_library SHARED impl_test_sot_external_interface.cpp
)
add_library
(
impl_test_library SHARED impl_test_sot_external_interface.cpp
)
target_include_directories
(
impl_test_library PUBLIC include
)
target_include_directories
(
impl_test_library PUBLIC include
)
target_link_libraries
(
impl_test_library PUBLIC sot-core::sot-core
)
target_link_libraries
(
impl_test_library PUBLIC impl_test_sot_mock_device
sot-core::sot-core
)
ament_target_dependencies
(
impl_test_library PUBLIC dynamic_graph_bridge_msgs
ament_target_dependencies
(
impl_test_library PUBLIC dynamic_graph_bridge_msgs
rclcpp rcl_interfaces std_srvs
)
rclcpp rcl_interfaces std_srvs
)
# Executable for SotLoaderBasic test
# Executable for SotLoaderBasic test
...
...
This diff is collapsed.
Click to expand it.
tests/launch/launching_test_sot_loader.py
+
5
−
6
View file @
5f6b95f4
...
@@ -31,7 +31,7 @@ from launch_ros.actions import Node
...
@@ -31,7 +31,7 @@ from launch_ros.actions import Node
def
generate_test_description
():
def
generate_test_description
():
"""
Load a simple urdf, parameters and the library.
"""
"""
Load a simple urdf, parameters and the library.
"""
ld
=
LaunchDescription
()
ld
=
LaunchDescription
()
print
(
"
After launch description
"
)
robot_description_content_path
=
PathJoinSubstitution
(
robot_description_content_path
=
PathJoinSubstitution
(
[
[
get_package_share_directory
(
"
dynamic_graph_bridge
"
),
get_package_share_directory
(
"
dynamic_graph_bridge
"
),
...
@@ -39,11 +39,10 @@ def generate_test_description():
...
@@ -39,11 +39,10 @@ def generate_test_description():
"
dgb_minimal_robot.urdf
"
,
"
dgb_minimal_robot.urdf
"
,
],
],
)
)
print
(
"
Before robot_description_content
"
)
robot_description_content
=
Path
.
open
(
robot_description_content_path
=
Path
(
robot_description_content_path
.
perform
(
None
))
robot_description_content_path
.
perform
(
None
),
robot_description_content
=
robot_description_content_path
.
open
().
read
()
).
read
()
print
(
"
Before params
"
)
params
=
{
params
=
{
"
state_vector_map
"
:
[
"
joint1
"
,
"
joint2
"
],
"
state_vector_map
"
:
[
"
joint1
"
,
"
joint2
"
],
"
robot_description
"
:
robot_description_content
,
"
robot_description
"
:
robot_description_content
,
...
...
This diff is collapsed.
Click to expand it.
tests/launch/launching_test_sot_loader_basic.py
+
10
−
8
View file @
5f6b95f4
...
@@ -33,17 +33,19 @@ def generate_test_description():
...
@@ -33,17 +33,19 @@ def generate_test_description():
It also set parameters state_vector_map and robot_description
It also set parameters state_vector_map and robot_description
"""
"""
print
(
"
start generate_test_description
"
)
ld
=
LaunchDescription
()
ld
=
LaunchDescription
()
robot_description_content_path
=
(
robot_description_pathjs_str
=
PathJoinSubstitution
(
Path
(
get_package_share_directory
(
"
dynamic_graph_bridge
"
))
[
/
"
urdf
"
get_package_share_directory
(
"
dynamic_graph_bridge
"
),
/
"
dgb_minimal_robot.urdf
"
"
urdf
"
,
"
dgb_minimal_robot.urdf
"
,
],
)
)
assert
robot_description_content_path
.
exists
()
robot_description_path
=
Path
(
robot_description_pathjs_str
.
perform
(
None
))
robot_description_content
=
Path
.
open
(
robot_description_content
=
robot_description_path
.
open
().
read
()
PathJoinSubstitution
(
str
(
robot_description_content_path
)).
perform
(
None
),
print
(
"
After building robot_description_content
"
)
).
read
()
terminating_process
=
Node
(
terminating_process
=
Node
(
package
=
"
dynamic_graph_bridge
"
,
package
=
"
dynamic_graph_bridge
"
,
executable
=
"
test_sot_loader_basic
"
,
executable
=
"
test_sot_loader_basic
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment