0
$\begingroup$

Rosanswers logo

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.


Originally posted by nsprague on ROS Answers with karma: 228 on 2020-06-23

Post score: 0


Original comments

Comment by Geoff on 2020-06-23:
Can you please post your actual code?

Comment by nsprague on 2020-06-24:
Here is a github repository with both packages:

https://github.com/spragunr/transform_service

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Found the answer here: #q326008.


Originally posted by nsprague with karma: 228 on 2020-07-03

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.