You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unit tests for tf2_sensor_msgs.cpp not executed? #365
What would be the challenge to run or incorporate the tests? I tried to run the generated binary in build/tf2_geometry_msgs/test_tf2_geometry_msgs manually, and the tests passed well. See the screenshot below.
What would be the challenge to run or incorporate the tests? I tried to run the generated binary in build/tf2_geometry_msgs/test_tf2_geometry_msgs manually, and the tests passed well. See the screenshot below.
I uncommented some testing part in CMakeLists.txt in tf2_sensor_msgs and ran colcon build. The compilation passed well but the expected binnary test_tf2_sensor_msgs_cpp is not generated. Any idea what happened? Below is the modified CMakeLists.txt of the tf2_sensor_msgs package.
You may also need to add some additional target_include_directories for EIGEN; I'm not sure. With something like that, it should be able to run under colcon test.
Activity
clalancette commentedon Jan 13, 2021
That's right, we've never ported the tests from ROS 1 to ROS 2. Any help in doing it would be appreciated!
zhoulaifu commentedon Jan 13, 2021
What would be the challenge to run or incorporate the tests? I tried to run the generated binary in build/tf2_geometry_msgs/test_tf2_geometry_msgs manually, and the tests passed well. See the screenshot below.
clalancette commentedon Jan 13, 2021
That's a different test in a different package. The one you linked to above was
test_tf2_sensor_msgs_cppfrom thetf2_sensor_msgspackage. To enable the tests intf2_sensor_msgs, you'd have to porttest_tf2_sensor_msgs.cppandtest_tf2_sensor_msgs.pyto ROS 2 (which both look straightforward), and then integrate them into the CMakeLists.txt. There are some examples of doing similar things in https://github.com/ros2/geometry2/blob/ros2/tf2/test/simple_tf2_core.cpp , for example.(incidentally, please copy-n-paste output rather than taking screenshots; screenshots aren't searchable)
zhoulaifu commentedon Jan 14, 2021
I uncommented some testing part in CMakeLists.txt in tf2_sensor_msgs and ran
colcon build. The compilation passed well but the expected binnarytest_tf2_sensor_msgs_cppis not generated. Any idea what happened? Below is the modified CMakeLists.txt of the tf2_sensor_msgs package.clalancette commentedon Jan 14, 2021
This whole section should be more like:
You may also need to add some additional
target_include_directoriesfor EIGEN; I'm not sure. With something like that, it should be able to run undercolcon test.CursedRock17 commentedon Mar 25, 2024
Did PR #422 fully resolve this, or can I pick this up?
clalancette commentedon Mar 25, 2024
Yeah, it looks like it was done, so I'll close this out.