In this series of videos we are going to learn how to use MoveIt! package with industrial robots. In this series we are going to use the Sawyer robot by Rethink Robotics.
Remember that you can follow all the steps with me at the same time by using the ROS Development Studio, without having to install anything in your system, and by using any operating system (yes, you can learn ROS with Windows!!!).
The instructions and steps provided here can be also made in your local computer with a proper installation of ROS.
[irp posts=”8707″ name=”Learning MoveIt! with Sawyer robot – #Part 1″]
// PART 2 VIDEO CONTENT
In this second video, we are showing: ▸ How to create the MoveIt! configuration package for Sawyer the robot, using the moveit_setup_assistant
▸ Previous video of this series (part 1) about how to install the Sawyer simulation: https://youtu.be/3wnX7teWIFQ
▸ Online course about how to learn to do ROS manipulation in 5 days, including grasping: https://goo.gl/v21WgA
ROS Manipulation is the term used to refer to any robot that manipulates something in its environment. The main goal of this Course is to teach you the basic tools you need to know in order to be able to understand how ROS Manipulation works, and teach you how to implement it for any manipulator robot.
In this series of videos we are going to learn how to use MoveIt! package with industrial robots. In this series we are going to use the Sawyer robot by Rethink Robotics.
[irp posts=”8709″ name=”Learning MoveIt! with Sawyer robot – #Part 2″]
// PART 1 VIDEO CONTENT
In this first video, we are showing:
▸ How to get the Sawyer simulation up and running
// RELATED LINKS
▸ You can launch the simulation at ROS Development Studio: https://goo.gl/VKDvsk
We show you a manual method to tune a PID for a robot that uses ROS Control to control its joints with a position controller. This method is very artisan but it is enough for most of the cases.
We do not teach how ROS Control works in this video. We assume you already know how to configure a joint to work with the ROS controllers.
Step 1. Create a project in ROS Development Studio(ROSDS)
ROSDS helps you follow our tutorial in a fast pace without dealing without setting up an environment locally. If you haven’t had an account yet, you can create a free account here. Let’s call the testing.
Step 2. Tune PID
At first, let’s launch the rrbot simulation from Simulations->RRBot. To control the robot, we also need to launch the control with
roslaunch rrbot_control rrbot_control.launch
You will have to tune the pid value in the rrbot_contorl.yaml file in the rrbot_control package under the config.
We can also use rqt_gui to help us tune the parameter.
rosrun rqt_gui rqt_gui
Then open the Tools->graphical tool.
In the gui, let’s send command to the rrbot/joint1_position_controller/command topic to control the robot. The message type is automatically selected to std_msgs/Float64. We’ll change the frequency to 50 Hz, then click +.
Then click the + on the left to unfold the topic and change the expression to sin(i/50)*0.5. Check the box on the left side to start publishing into the topic.
You should see the robot starts to swing it’s arm now.
It’s also possible to plot the message from Plugins->Visualization->Plot
Select the correct topic /rrbot/joint1_position_controller/state/process_value/data then click +. You should see the data sent.
How about the actual value? It’s in the topic /rrbot/joint1_position_controller/state/process_value.
You’ll see that the actual state of the robot didn’t follow the command sent to the robot. That’s the reason why we need to tune the pid value.
Let’s open another tool to help us tune the value at the same time. Go to Plugins->Configuration->Dynamic Reconfigure.
You can change all the pid value in the plugin.
To tune the pid:
We start by increasing the p value to make the controller output more to catch the command.
Increase the d value a bit to make the movement smoother.
You should see the state can synchronize with the command now. You can change the command to see if the controller can follow the command nicely. Then you can save the value in the rrbot_controller.yaml file.
Remember, you have to launch the controller again to apply the new value.
If you need to understand better ROS Control, please take the following course for fast understanding:
We show you how you can launch two drones (or more) in the same Gazebo simulation, each one having its own independent control system based on ROS. This procedure can be replicated to launch as many drones as required.
RELATED LINKS
– How to start programming drones with ROS: https://youtu.be/f7b5tSZW1Ig – Hector Quadrotor Simulation: https://bitbucket.org/theconstructcore/hector_quadrotor_sim – ROS Development Studio: https://goo.gl/Yf2Q4J
[irp posts=”6638″ name=”ROS Q&A | How to Start Programming Drones using ROS”]
Q: I am wondering if there is any way to print message from launch file. For example, I am calling a node from launch file and I do not want the user to terminate this process.
A: The best way is to create a simple Python script that does that.