Robotics StackExchange | Archived questions

Where should I write and call gpio port connection in the hardware interface in ros2_control for control of robot movement on Raspberry Pi 4?

I am using ROS 2 Humble on Raspberry Pi 4(Ubuntu 22.04 OS). I am trying to build 2-wheeled diff-drive mobile robot and using ros2control for controlling. But I'm not getting where should I write GPIO port connections part? I am trying to control movement through Raspberry Pi GPIO pins using ros2control. I have found many examples but with Raspberry Pi and Arduino serial connection not with only Raspberry Pi GPIO controlled and L298N motor driver. I am not getting whether it can be velocity controlled or not. Please help me. Thanks.

Asked by Shah@ on 2023-03-12 06:58:33 UTC

Comments

I am also looking for this, in my case using the https://www.waveshare.com/motor-driver-hat.htm hat but strugaling.

Asked by KevWal on 2023-03-25 15:15:33 UTC

I'm also encountering this issue. Trying to work with PWM from the Pi's GPIO pins. Have created python files that accomplish this, but not with ROS2_control yet

Asked by BoatBot on 2023-04-10 18:41:16 UTC

Answers