-
Notifications
You must be signed in to change notification settings - Fork 21
Tutorial Robot Test Pick and Place
This tutorial guides on:
- Develop applications on RVIZ simulation.
- Deploy application for real robot operation.
Besides it provides inside on the advantages of operating with ROS framework instead of the classical teach pendant and INFORM III approach.
By performing this tutorial we will prove that ROS control can correctly manipulate simultaneously the 15 DoF of the robot while performing collision checking.
Fist follow the steps indicated in the preparation section of the tutorial "Connect to Robot Controller".
Then launch the tutorial .launch file:
roslaunch invite_motoman_moveit_config moveit_planning_execution.launch robot_ip:="<robot_ip>"
rosrun invite_beginner_tutorials invite_pick_and_place_tutorial
Replace ROBOT_IP for the IP address of the robot controller.
And once Rviz is loaded correctly load the default scene objects through the GUI options for scene objects.
Start the tutorial.
roslaunch invite_motoman_moveit_config demo.launch load_scene:=true
rosrun invite_beginner_tutorials invite_pick_and_place_tutorial
Important: Do not forget to launch robot enable service for real robot operation.
This demo/tutorial is defined on the invite_pick_and_place.cpp file, please open it and follow each of the steps of the tutorial while running.
The launch file will load the default scene collision objects, and if the sim
argument is set to true, it will connect to the robot controller. The Rviz and Moveit graphical interface will be launched but for the moment we will not use the GUI.
As in the Move Group Interface Tutorial this demo will be controlled through the RvizVisualToolsGUI pannel (see the section on how to iterate through the tutorial steps) Steps:
-
The robot will move to a predefined home position, which has the arms folded looking in the direction of
-Y
. -
A manipulation object (glass cup) is added to the Rviz simulation environment.
-
The robot will use its left arm to approach to the glass cup.
-
To-Do: The gripper will be actuated and the glass will be grabbed.
-
The robot will plan a trajectory for placing the selected object into the drum, during planning the object is also taken into account for collision checking.
5.1. If the planning fails it will go to a home position and retry from this position to reach the dropping coordinates.
-
The robot will drop the object and return to a home position.
To go to the next step of the tutorial in Rviz locate the RvizVisualToolsGui
panel (if the panel is not present add it by pressing the Panels
button on the window menu and then add new panel
) and press the next
button.
Launch File pick_and_place_tutorial.launch
The launch file for the tutorial uses a launch argument do differentiate when the user wants to operate the real robot or wants to simulate the operation.
The first part defines the required parameters, taking into account that if we simulate no robot controller IP is required.
...
<!-- Paramter to define whether the tutorial runs on simulation or in the real robot-->
<arg name="sim" default="true"/>
<!-- When not simulating, parameters for real robot interface -->
<arg name="robot_ip" unless="$(arg sim)" value="$(arg robot_ip)" doc="Robot controller IP address"/>
<arg name="controller" unless="$(arg sim)" value="$(arg controller)" default="fs100"/>
...
Then depending on the sim
argument we proceed as expected.
<!-- Connect to real robot -->
<group unless="$(arg sim)">
<!--Run the robot simulation or interface nodes for real robot operation -->
<include file="$(find invite_motoman_moveit_config)/launch/moveit_planning_execution.launch">
<arg name="sim" value="true"/>
<arg name="robot_ip" unless="$(arg sim)" value="$(arg robot_ip)"/>
<arg name="controller" unless="$(arg sim)" value="$(arg controller)"/>
</include>
<!-- Load `scene_file` scene objects for collision checking -->
<node name= "moveit_publish_scene_from_text" pkg= "moveit_ros_planning" type="moveit_publish_scene_from_text"
args= "$(arg scene_file)" output="screen"/>
</group>
<!--Start simulated robot -->
<group if="$(arg sim)">
<include file="$(find invite_motoman_moveit_config)/launch/demo.launch">
<arg name="load_scene" value="true"/>
</include>
</group>
Finally we launch the tutorial executable.
<!-- Launch tutorial executable Node-->
<node name="invite_pick_and_place" type="invite_pick_and_place" pkg="invite_beginner_tutorials" output="screen">
<param name="sim" type="bool" value="$(arg sim)"/>
</node>
Invite-Robotics
-
Tutorials