Robotics StackExchange | Archived questions

Servo Controller Example Ros not working ?

The servo controller basic example is not working which i took from the ros tutorials , http://wiki.ros.org/rosserial_arduino/Tutorials/Servo%20Controller There is not error in the program, as soon as i uploaded the sketch no error in arduino side. Then ran,

rosrun rosserialpython serialnode.py /dev/ttyACM0

and this

rostopic pub servo std_msgs/UInt16 140

as mentioned in the tutorial. Then i got,

rostopic pub servo std_msgs/UInt16 "data: 140" publishing and latching message. Press ctrl-C to terminate

There is not action with servo motor. it is just energized but not action. I have echo the rostopic /servo , the values been published but motor not working.

I tried uploading the non ros program to servo in the same ubuntu, it worked perfectly. So the problem might be in ros.

I am using ros noetic . Ubuntu 20.04 and Arduino uno

So how can i solve this issue ?

Asked by Rakee003 on 2021-10-04 11:28:09 UTC

Comments

There are issues with Noetic version for rosserial as it’s relatively new. You can see many issues in their repo related to this. For example: https://github.com/ros-drivers/rosserial/issues/512

I’m sure there are work arounds. Did you build ros serial from source?

Asked by osilva on 2021-10-04 16:21:14 UTC

https://github.com/ros-drivers/rosserial/commit/adb84cc931064ea8fc48a081345c48d5d73dc647 Try a non-official commit

Asked by osilva on 2021-10-04 16:26:08 UTC

Answers