Ask Your Question
0

Integrate sensor_msgs with ros 2 ?

asked 2017-09-25 02:34:30 -0500

Skyking gravatar image

I want to create a pub-sub using sensor_msgs in ros 2? Is there tutorial showing how to do this ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-25 04:38:43 -0500

updated 2017-09-27 02:10:15 -0500

Check the listener and talker under demo_node_cpp. If you don't have repositories look here https://github.com/ros2/ros2/wiki/Ame... .

Change the message and include your sensor message type, and use as in ROS 1.

Also, check this Imu listener: https://github.com/ros2/demos/blob/ma...

e.g. if sensor messages from Joint State of a robot

#include "sensor_msgs/msg/joint_state.hpp"

const sensor_msgs::msg::JointState state;

should be the message type.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-09-25 02:34:30 -0500

Seen: 186 times

Last updated: Sep 27 '17