how to interface a servo motor with an arduino mega2560 using ros ?

asked 2016-05-24 05:48:46 -0500

rpxz gravatar image

i'm trying to use the code in the follwing link: http://wiki.ros.org/rosserial_arduino... how to implement this program .please help me .

edit retag flag offensive close merge delete

Comments

Whats' exactly your problem with the tutorial?

Femer gravatar image Femer  ( 2016-05-24 07:30:08 -0500 )edit

i'm unable to upload the ros code given to my arduino mega2560 board.

rpxz gravatar image rpxz  ( 2016-05-25 00:33:10 -0500 )edit

could you send more details about the error message you receive from the Arduino IDE ?

Femer gravatar image Femer  ( 2016-05-25 03:34:15 -0500 )edit

it doesnt show any error.. but the servo doesnt move even after following the commands to b used after uploading the code

rpxz gravatar image rpxz  ( 2016-05-25 05:01:05 -0500 )edit

ah, so you can actually upload the code on your Arduino board? You said you were unable to do it. In the "Testing" section I guess one part is missing: after starting roscore, type in a new terminal the command rosrun rosserial_python serial_node.py /dev/ttyUSBX (Make sure to use the correct USB)

Femer gravatar image Femer  ( 2016-05-25 07:10:59 -0500 )edit

i already tried it. still it not moving.i connected an led to check whether there's any problem with the board,but that it isn't the problem. the servo progrm uploaded and rosrun n rostopic pub.. was also done even then its not happening..the ros core was also run

rpxz gravatar image rpxz  ( 2016-05-26 00:07:11 -0500 )edit

fixed it .. it was nt getting enough power to the board .. thanx anyway :)

rpxz gravatar image rpxz  ( 2016-05-26 02:22:35 -0500 )edit

what do u mean not enough power? how do you powering it before?

adelleodel gravatar image adelleodel  ( 2016-05-26 04:51:15 -0500 )edit