ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can I replace Hardware_interface to send velocity to a PLC?

asked 2019-08-07 10:10:39 -0600

Syrine gravatar image

hello,

I'm planning on writing a hardware_interface in order to send velocity commands to codesys following this question https://answers.ros.org/question/3075... but I don't quite understand how to read from the diff_drive both wheels velocities and send them to my plc.

I want to know if is it possible to replace the hardware_interface with just a node that subscribes to cmd_vel and publishes or sends the converted values (from rad/s to rpm for example) directly to codesys.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-07 12:52:18 -0600

duck-development gravatar image

updated 2019-08-07 12:54:06 -0600

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.

edit flag offensive delete link more

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_contro...), what I don't know is how the hardware_inteface takes or reads these velocities from the diff_drive;

Syrine gravatar image Syrine  ( 2019-08-08 02:58:39 -0600 )edit
1

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/5abd8a1e... seems also to be interesting

duck-development gravatar image duck-development  ( 2019-08-08 12:50:05 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-08-07 10:10:39 -0600

Seen: 436 times

Last updated: Aug 07 '19