ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Error when running a C++ service node using a custom srv in ROS2

asked 2020-06-23 11:32:59 -0600

nsprague gravatar image

updated 2020-06-25 15:09:37 -0600

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.

edit retag flag offensive close merge delete

Comments

1

Can you please post your actual code?

Geoff gravatar image Geoff  ( 2020-06-23 18:44:28 -0600 )edit

Here is a github repository with both packages:

https://github.com/spragunr/transform_service

nsprague gravatar image nsprague  ( 2020-06-24 07:18:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-03 15:24:42 -0600

nsprague gravatar image

updated 2020-07-04 08:22:15 -0600

gvdhoorn gravatar image

Found the answer here: #q326008.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-23 11:32:59 -0600

Seen: 366 times

Last updated: Jul 04 '20