Can I replace Hardware_interface to send velocity to a PLC?
hello,
I'm planning on writing a hardwareinterface in order to send velocity commands to codesys following this question https://answers.ros.org/question/307520/what-are-the-steps-to-use-diffdrivecontroller-in-a-physical-robot/ but I don't quite understand how to read from the diffdrive both wheels velocities and send them to my plc.
I want to know if is it possible to replace the hardwareinterface with just a node that subscribes to cmdvel and publishes or sends the converted values (from rad/s to rpm for example) directly to codesys.
Asked by Syrine on 2019-08-07 10:10:39 UTC
Answers
if you look at the picure of http://wiki.ros.org/differential_drive you see that you write a node to red the lmotor and publishes the wheel. and your done.
as you have an IEC system you may move the PID inside of you PLC. or you motor inverter is already incude a a PID for velocity.
Asked by duck-development on 2019-08-07 12:52:18 UTC
Comments
Hey,
I saw the diagram but what I know is the diff_drive_controller takes as input the geometry_msgs::twist (http://wiki.ros.org/diff_drive_controller#Description), what I don't know is how the hardware_inteface takes or reads these velocities from the diff_drive;
Asked by Syrine on 2019-08-08 02:58:39 UTC
Did you look at http://wiki.ros.org/ros_control there are some slide and talkes this may help you to understand the system.
This https://slaterobots.com/blog/5abd8a1ed4442a651de5cb5b/how-to-implement-ros_control-on-a-custom-robot seems also to be interesting
Asked by duck-development on 2019-08-08 12:50:05 UTC
Comments