How to send MoveIt joint control data to actual motor

asked 2018-08-14 01:31:17 -0500

Robo_Panda gravatar image

I want to the motor of my robotic arm based on effort/velocity data that i get after planning trajectory on move it. How do i connect my motor and get it to move?

Motor Specification: Rhino DC-servo with step/direction drive

edit retag flag offensive close merge delete



based on effort/velocity data that i get after planning trajectory on move it

just to clarify: MoveIt plans in position joint space only. Do you want to realise trajectory play out / execution, or are you looking for actual velocity control?

gvdhoorn gravatar image gvdhoorn  ( 2018-08-14 02:57:57 -0500 )edit

Yes i need to transmit the position data. I had read in a tutorial that we the joint state publisher can send effort/velocity/position data.

Robo_Panda gravatar image Robo_Panda  ( 2018-08-14 03:53:55 -0500 )edit

The JSP is for publishing joint state, not for commanding it. In addition, JointState msgs are typically published by a driver for your hw/robot. The JSP is only used when aggregating different msgs, or in 'simulation' mode (with gui:=true).

gvdhoorn gravatar image gvdhoorn  ( 2018-08-14 04:20:29 -0500 )edit

Ok thanks for the correction. I'm a bit of a beginner with ROS. Could you tell me how to actuate my motor based on the trajectory planned using Move it? P.S. my motors work in open loop and don't have feedback.

Robo_Panda gravatar image Robo_Panda  ( 2018-08-14 05:38:11 -0500 )edit

You would want an Arduino controller for the motor e.g. . Then write a node that subscribes to the topic MoveIt! outputs its plan and calls the control code as appropriate. This might help too:

scchow gravatar image scchow  ( 2018-08-14 18:32:48 -0500 )edit

The arduino library that you have listed above is for UART based DC motors. The one that I have is based on step direction drive so I was thinking of using Accelstepper library. Do i need some some other library for ROS?

Robo_Panda gravatar image Robo_Panda  ( 2018-08-15 05:57:50 -0500 )edit

Sorry, meant that library as an example, as long as you have some sort of controller. Other than rosserial_arduino (since that seems to be what you're working with), you shouldn't need other libraries. Try using the wiki example and replace the servo.write() in servo_cb() with your motor controller.

scchow gravatar image scchow  ( 2018-08-15 08:43:22 -0500 )edit

Could you please elaborate on the procedure to send joint commands generated by MoveIt to motors.

Robo_Panda gravatar image Robo_Panda  ( 2018-08-16 01:02:48 -0500 )edit