How to send MoveIt joint control data to actual motor
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
Asked by Robo_Panda on 2018-08-14 01:31:17 UTC
Comments
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?
Asked by gvdhoorn on 2018-08-14 02:57:57 UTC
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.
Asked by Robo_Panda on 2018-08-14 03:53:55 UTC
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 (withgui:=true
).Asked by gvdhoorn on 2018-08-14 04:20:29 UTC
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.
Asked by Robo_Panda on 2018-08-14 05:38:11 UTC
You would want an Arduino controller for the motor e.g. https://github.com/samvrit/Rhino. Then write a node that subscribes to the topic MoveIt! outputs its plan and calls the control code as appropriate. This might help too: http://wiki.ros.org/rosserial_arduino/Tutorials/Servo%20Controller
Asked by scchow on 2018-08-14 18:32:48 UTC
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?
Asked by Robo_Panda on 2018-08-15 05:57:50 UTC
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.
Asked by scchow on 2018-08-15 08:43:22 UTC
Could you please elaborate on the procedure to send joint commands generated by MoveIt to motors.
Asked by Robo_Panda on 2018-08-16 01:02:48 UTC
Where are you stuck? Please add what you have tried until now, what you think the problem is, and how you are getting to the solution, so other people can make use of this question later.
Asked by fvd on 2018-09-03 02:37:27 UTC