Error when running a C++ service node using a custom srv in ROS2
I'm trying to follow these two tutorials to create a node that provides a ROS2 service using a custom .srv:
Following the steps in the tutorials, I've created the following packages:
transform_service_srv
- contains the custom srv type.transform_service
- contains the server.
Both packages build using colcon with no warnings.
I can examine the srv as follows:
$ ros2 srv show transform_service_srv/srv/TransformPose
geometry_msgs/PoseStamped source_pose
string target_frame
---
geometry_msgs/PoseStamped target_pose
bool success
Attempting to run the service node results in the following error:
$ ros2 run transform_service transform_service
/home/spragunr/ros2_ws/install/transform_service/lib/transform_service/transform_service: symbol lookup error: /home/spragunr/ros2_ws/install/transform_service_srv/lib/libtransform_service_srv__rosidl_typesupport_fastrtps_cpp.so: undefined symbol: _ZN13geometry_msgs3msg24typesupport_fastrtps_cpp31max_serialized_size_PoseStampedERbm
I don't have any experience building ROS2 C++ nodes, so I don't know where to begin debugging this. I've attempted this in both dashing and foxy and the result is exactly the same for both.
Can you please post your actual code?
Here is a github repository with both packages:
https://github.com/spragunr/transform_service