Rosserial Twist message not working

asked 2018-08-21 15:29:14 -0500

seint gravatar image

updated 2018-08-21 16:20:37 -0500

jayess gravatar image

Hello.Sorry for my english first. i ve tried to subscribe geometry_msgs::Twist message but never can handle callback function. i tried different kind message to handle.and successfully i can trigger callback function with std_msgs/String , std_msgs/Empty, std_msgs/Float64

my code of arduino

https://paste.ee/p/0uW1j

and i m publishing

rostopic pub -1 /cmd_vel geometry_msgs/Twist -- [2.0, 0.0, 0.0] [ 0.0, 0.0, 1.0]

publish is done. i can check it with

rostopic echo /cmd_vel

and i can see data is coming.

but arduino never can handle twist message .

i ve tried arduino due and arduino uno both same results. i searched for a long and i think my syntax and code is done. when i run rosrun rosserial its showing me that subscripe successfully subscribed for arduino.

but i never can handle on arduino geometry_msgs/Twist callback function never trigger.can anyone give me idea that how it s possible ? Thx for ur advice .

edit retag flag offensive close merge delete

Comments

Can you please update your question with a copy and paste of your code (using the 101010 to enable the syntax highlighting and formatting).

jayess gravatar image jayess  ( 2018-08-21 16:21:07 -0500 )edit

Is there an answer for this yet? I'm facing the same problem and can't seem to figure out what could be wrong.

the3kr gravatar image the3kr  ( 2020-04-01 10:35:34 -0500 )edit

In case anyone else has this question, the fix is to either increase the baud rate or buffer size on arduino's end. Check this link for more info: https://answers.ros.org/question/3024...

the3kr gravatar image the3kr  ( 2020-04-01 11:10:41 -0500 )edit