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

Raspberry + ROS + Servo

asked 2016-11-21 13:43:28 -0500

zpguedes gravatar image

updated 2016-11-23 22:09:56 -0500

Hi guys,

could anyone tell me some tutorial that teaches to control servoss via ROS installed in a Raspberry PI 3 (Ubuntu Mate

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-12-10 12:53:34 -0500

updated 2016-12-11 14:23:23 -0500

I've been working through this scenario. (See if this description is what you are attempting: http://elder.ninja/blog/p/6106 )

Here are a few things which may make your life a bit easier:

Using Ubuntu server for RPi3 (rather than raspbian jessie) does make your query easier as you can install most packages using "apt-get install" and not need to "git" the source.

For PWM for positional control of standard servos as well as speed and direction control of continuous servos, you might check out the ros_i2cpwmboard package: https://gitlab.com/bradanlane/ros-i2c...

Short description of end-to-end demonstration: http://elder.ninja/blog/p/6804 and accompanying video: https://vimeo.com/193201509

The documentation ( http://bradanlane.gitlab.io/ros-i2cpw... ) for the ros_i2cpwmboard package gives simple test examples of rostopic() and rosservice(). The package supports controlling servos using direct PWM values, proportional values (-1.0 .. 1.0) and using geometry_msgs::Twist - the latter makes it easier to integrate with the turtlesim tutorials.

edit flag offensive delete link more
0

answered 2016-11-22 07:24:35 -0500

bluehash gravatar image

I'm assuming you have ROS installed on your Pi3. I would first start by controlling a servo using the Pi PWM or any of the widely used Pi GPIO libraries. . Then start by writing a ROS servo subscriber node. You can use this ROS tutorial) as an example.

Once you have the two parts running, you will have to merge the servo code to the subscriber code, so that the servo node listens on a ros topic, say /pi/servoAngle. You can then send commands to the topic using the rostopic pub command.

If you are not familiar with ROS concepts, I would start with the basic ROS tutorials first.

edit flag offensive delete link more

Comments

Now I'm going to sleep but tomorrow I'll follow your advice, thank you, it was already a great help!

zpguedes gravatar image zpguedes  ( 2016-11-23 22:06:23 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2016-11-21 13:43:28 -0500

Seen: 5,674 times

Last updated: Dec 11 '16