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

How to access ChannelFloat32 in python?

asked 2020-04-16 14:37:02 -0500

bionade24 gravatar image

Hello, I'm on melodic and try to subscribe to a ChannelFloat32 message, but I neither can import the type nor have an Idea how to access that. How can I do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-17 11:45:55 -0500

Weasfas gravatar image

Hi @bionade24,

In Python the bindings are:

from sensor_msgs.msg import ChannelFloat32
cf_msg = ChannelFloat32()

in C++:

#include <sensor_msgs/ChannelFloat32.h>
sensor_msgs::ChannelFloat32 cf_msg;
edit flag offensive delete link more

Comments

Thx, I didn't know that I need .msg additionally in python.

bionade24 gravatar image bionade24  ( 2020-04-17 12:09:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-16 14:37:02 -0500

Seen: 201 times

Last updated: Apr 17 '20