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

Message with array of data

asked 2022-03-17 03:36:09 -0500

s0nc gravatar image

Hello everyone,

I try to create a custom message containing an array of int8. Therefore I use the .msg-file

int8 len
int8[] data

and when I run colcon everything is fine. The resulting node publishes messages as shown above. When I run the node it immediately crashes without any warnings or errors. The node itself works fine when I use sensor_msgs::msg::Imu. Does anyone know how to fix this?

Regards s0nc

edit retag flag offensive close merge delete

Comments

Just to be sure - did you add this new message to your CMakeLists in rosidl_generate_interfaces(${PROJECT_NAME} ...) and rosidl_default_generators, rosidl_default_runtime int the package.xml in build and exec dependencies?

ljaniec gravatar image ljaniec  ( 2022-03-20 22:10:41 -0500 )edit

I just included them as build_depend. It finally works. Thank you!

s0nc gravatar image s0nc  ( 2022-03-21 01:58:03 -0500 )edit

Awesome, I just copied my comment to the answer, please upvote and accept it so your question will be marked as solved :)

ljaniec gravatar image ljaniec  ( 2022-03-21 03:20:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-03-21 03:20:52 -0500

ljaniec gravatar image

Just to be sure - you have to add this new message to your CMakeLists.txt in rosidl_generate_interfaces(${PROJECT_NAME} ...) and rosidl_default_generators, rosidl_default_runtime in the package.xml in build and exec dependencies.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-03-17 03:36:09 -0500

Seen: 125 times

Last updated: Mar 21 '22