Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix most servo tests, cleanup #511

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions moveit2.repos
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ repositories:
type: git
url: https://github.com/ros-planning/warehouse_ros_mongo
version: ros2
osrf_pycommon:
type: git
url: https://github.com/osrf/osrf_pycommon
version: master
launch:
type: git
url: https://github.com/ros2/launch
version: master
launch_ros:
type: git
url: https://github.com/ros2/launch_ros
version: master
105 changes: 46 additions & 59 deletions moveit_ros/moveit_servo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,71 +189,58 @@ if(BUILD_TESTING)
ament_add_gtest(test_low_pass_filter test/test_low_pass_filter.cpp)
target_link_libraries(test_low_pass_filter ${SERVO_LIB_NAME})

# TODO(andyz): re-enable integration tests when they are less flakey.
# The issue is that the test completes successfully but a results file is not generated.

# # Unit test for ServoCalcs
# TODO(vatanaksoytezer): re-enable servo calculation test once it is not flaky.
# Unit test for ServoCalcs
# ament_add_gtest_executable(
# unit_test_servo_calcs
# test/unit_test_servo_calcs.cpp
# )
# target_link_libraries(unit_test_servo_calcs ${SERVO_LIB_NAME})
# ament_target_dependencies(unit_test_servo_calcs ${THIS_PACKAGE_INCLUDE_DEPENDS} Boost)
# add_ros_test(test/launch/unit_test_servo_calcs.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# # Servo integration launch test
# ament_add_gtest_executable(test_servo_integration
# test/test_servo_interface.cpp
# test/servo_launch_test_common.hpp
# )
# target_link_libraries(test_servo_integration ${SERVO_PARAM_LIB_NAME})
# ament_target_dependencies(test_servo_integration ${THIS_PACKAGE_INCLUDE_DEPENDS})
# add_ros_test(test/launch/test_servo_integration.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# # Servo collision checking integration test
# ament_add_gtest_executable(test_servo_collision
# test/test_servo_collision.cpp
# test/servo_launch_test_common.hpp
# )
# target_link_libraries(test_servo_collision ${SERVO_PARAM_LIB_NAME})
# ament_target_dependencies(test_servo_collision ${THIS_PACKAGE_INCLUDE_DEPENDS})
# add_ros_test(test/launch/test_servo_collision.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# # Servo singularity checking integration test
# ament_add_gtest_executable(test_servo_singularity
# test/test_servo_singularity.cpp
# test/servo_launch_test_common.hpp
# )
# target_link_libraries(test_servo_singularity ${SERVO_PARAM_LIB_NAME})
# ament_target_dependencies(test_servo_singularity ${THIS_PACKAGE_INCLUDE_DEPENDS})
# add_ros_test(test/launch/test_servo_singularity.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# TODO(henningkayser): Port tests to ROS2
# servo_cpp_interface
# add_rostest_gtest(servo_cpp_interface_test
# test/servo_cpp_interface_test.test
# test/servo_cpp_interface_test.cpp
# )
# target_link_libraries(servo_cpp_interface_test
# ${SERVO_LIB_NAME}
# ${catkin_LIBRARIES}
# )

# # pose_tracking
# ament_add_gtest_executable(test_servo_pose_tracking
# test/pose_tracking_test.cpp
# )
# ament_target_dependencies(test_servo_pose_tracking ${THIS_PACKAGE_INCLUDE_DEPENDS})
# target_link_libraries(test_servo_pose_tracking ${POSE_TRACKING})
# add_ros_test(test/launch/test_servo_pose_tracking.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# # basic_servo_tests
# ament_add_gtest_executable(basic_servo_tests
# test/basic_servo_tests.cpp
# )
# ament_target_dependencies(basic_servo_tests ${THIS_PACKAGE_INCLUDE_DEPENDS})
# target_link_libraries(basic_servo_tests ${POSE_TRACKING})
# add_ros_test(test/launch/test_basic_servo.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")
# add_ros_test(test/launch/unit_test_servo_calcs.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# Servo integration launch test
ament_add_gtest_executable(test_servo_integration
test/test_servo_interface.cpp
test/servo_launch_test_common.hpp
)
target_link_libraries(test_servo_integration ${SERVO_PARAM_LIB_NAME})
ament_target_dependencies(test_servo_integration ${THIS_PACKAGE_INCLUDE_DEPENDS})
add_ros_test(test/launch/test_servo_integration.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# Servo collision checking integration test
ament_add_gtest_executable(test_servo_collision
test/test_servo_collision.cpp
test/servo_launch_test_common.hpp
)
target_link_libraries(test_servo_collision ${SERVO_PARAM_LIB_NAME})
ament_target_dependencies(test_servo_collision ${THIS_PACKAGE_INCLUDE_DEPENDS})
add_ros_test(test/launch/test_servo_collision.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# Servo singularity checking integration test
ament_add_gtest_executable(test_servo_singularity
test/test_servo_singularity.cpp
test/servo_launch_test_common.hpp
)
target_link_libraries(test_servo_singularity ${SERVO_PARAM_LIB_NAME})
ament_target_dependencies(test_servo_singularity ${THIS_PACKAGE_INCLUDE_DEPENDS})
add_ros_test(test/launch/test_servo_singularity.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# Servo pose tracking test
ament_add_gtest_executable(test_servo_pose_tracking
test/pose_tracking_test.cpp
)
ament_target_dependencies(test_servo_pose_tracking ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_link_libraries(test_servo_pose_tracking ${POSE_TRACKING})
add_ros_test(test/launch/test_servo_pose_tracking.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

# Basic servo functionality test
ament_add_gtest_executable(basic_servo_tests
test/basic_servo_tests.cpp
)
ament_target_dependencies(basic_servo_tests ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_link_libraries(basic_servo_tests ${POSE_TRACKING})
add_ros_test(test/launch/test_basic_servo.test.py TIMEOUT 300 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")

endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def generate_test_description():
),
parameters=[servo_params],
output="screen",
# prefix="kitty gdb -e run --args"
)

return (
Expand Down
Loading