Ask Your Question
0

publishing float values in rosserial

asked 2015-10-27 07:34:15 -0500

rosdino gravatar image

Hello everyone

I'm experimenting with rosserial. I tried to publish string values as given here, it works http://wiki.ros.org/rosserial_arduino...

Similarly I'm looking to publish float values, can anyone give me an example how to do it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-27 23:02:03 -0500

stormswordx gravatar image

Instead of lines 11 & 12. You will need to instantiate the publisher with a different message data type.

std_msgs::Float64 myData;
ros::Publisher sendData("float_data", &myData);

These are some common message types I find myself using often.

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: 2015-10-27 07:34:15 -0500

Seen: 1,044 times

Last updated: Oct 27 '15