Control Motors from cmd_vel directly
I have a program set up in which I can control all motors pwm and their directions from C code using sysfs. I also have an online dashboard from which I can publish cmd_vel messages with which I wish to control the device movement. I cannot seem to find any examples of combing a C program directly changing header pins with a ROS program handling the Twist messages.
Is there such examples which I can look into using? I need to control the header pins directly and using an extra component such as an arduino is not an option.
Asked by Pieter90 on 2022-10-11 17:07:28 UTC
Answers
You should use the libgpiod instead of sysfs explains why Or use lgpio http://abyz.me.uk/lg/lgpio.html if you need pwm.
C code is compliabe with cpp code
Asked by duck-development on 2022-10-18 18:01:44 UTC
Comments