Ask Your Question
0

How to interface high level controllers i.e ros_control with low level controllers such as Arduino/Tiva-c?

asked 2019-07-29 08:17:18 -0500

Voyager97 gravatar image

I am building a 5-DOF robotic manipulator from scratch and using Moveit! for motion planning. I've completed initial setup of Moveit! but I'm stuck on sending joint trajectories to micro-controller for implementing the planned motion. I've done appropriate research about the same and concluded that it can be implemented in 3 ways-

(i) ros_control - Write a hardware interface to command the joints but unable to understand how exactly will it be interfaced with low level controllers. Sample codes will be hugely appreciated. I've read ros_control documentation and read about roscon 2014 talk about ros_control.

(ii) Using Moveit! - https://github.com/jesseweisberg/move... Don't see a hardware interface being used.

(iii) Writing custom controllers - https://github.com/BourbonCreams/brac...
Controller code https://github.com/BourbonCreams/brac... Arduino Code

What method is to be preferred and also how to implement it?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-05 03:14:41 -0500

bvaningen gravatar image

The best way to do this IMO is to use your first option: ROS_control. Here you will write an interface between ROS and the micro controllers that you are using. It will start a hardware interface and a controller manager. You can load ROS controllers into the controller manager using a launch file. The type of controller that you will use (position_controllers, velocity_controller, and effort_controllers) will depend on the input that your micro controllers are expecting. The controller manager has an update() method that can be called, asking all controllers to calculate a new error and corresponding output, depending on the interface that you are using. To do this, the controller will read (in order to get sensor data) and write (to pass the output to the microcontrollers) from/to the hardware interface.

Here is a detailed explanation of what is needed to write a hardware interface: https://slaterobots.com/blog/5abd8a1e...

The best way to understand this is by example:

https://github.com/SlateRobotics/tr1_...

This same repository also shows more than just the writing of the hardware interface. It also shows how to load the controllers. Checkout the launch files.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-07-29 08:17:18 -0500

Seen: 59 times

Last updated: Aug 05