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

Control Motors from cmd_vel directly [closed]

asked 2022-10-11 17:07:28 -0600

Pieter90 gravatar image

updated 2022-10-29 14:01:09 -0600

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.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Pieter90
close date 2022-10-29 14:06:44.244969

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-18 18:01:44 -0600

duck-development gravatar image

You should use the libgpiod instead of sysfs explains whyOr use lgpio http://abyz.me.uk/lg/lgpio.html if you need pwm.

C code is compliabe with cpp code

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-10-11 17:07:28 -0600

Seen: 151 times

Last updated: Oct 29 '22