-
Notifications
You must be signed in to change notification settings - Fork 3
HIRo Path Planning & Control
Gazebo is a simulator and it doesn't do any motion planning. ROS is the middleware that allows Gazebo to talk to other software. MoveIt! is a motion planning framework that uses ROS to talk to Gazebo.
Gazebo is a 3D simulator, while ROS serves as the interface for the robot. With Gazebo you are able to create a 3D scenario on your computer with robots, obstacles and many other objects. Gazebo also uses a physical engine for illumination, gravity, inertia, etc.
When installing ROS Kinetic full version, you'd already get Gazebo. However, we need Gazebo9 to avoid this error, spawn_model -J initial joint positions not working #93 (basically the bug is that we cannot set initial positions for the joints for our simulated robot using the -J argument in the launch file)
- Setup your computer to accept software from packages.osrfoundation.org.
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
You can check to see if the file was written correctly. For example, in Ubuntu Xenial, you can type:
cat /etc/apt/sources.list.d/gazebo-stable.list
# you'd get this result
deb http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial main
- Setup keys
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- Update Debian package
sudo apt-get update
- Install Gazebo9.
sudo apt-get install ros-kinetic-gazebo9-ros-pkgs ros-kinetic-gazebo9-ros-control
MoveIt is a primary source of a lot of the functionality for manipulation (and mobile manipulation) in ROS. MoveIt builds on the ROS messaging and build systems and utilizes some of the common tools in ROS like the ROS Visualizer (Rviz) and the ROS robot format (URDF). MoveIt is fast becoming the entry point into ROS, especially through the use of the MoveIt Setup Assistant for configuring new robots.
To install MoveIt!, run this command in the terminal:
sudo apt-get install ros-melodic-catkin python-catkin-tools
Optional Tutorials: if you want to learn more about MoveIt!, you can follow instructions on this page: https://ros-planning.github.io/moveit_tutorials/doc/getting_started/getting_started.html#download-the-example-code.
Note: Please change the word melodic
to kinetic
when installing the software, and follow their instructions to create a separate catkin workspace ws_moveit
.
- Setup Assistance tutorial: https://ros-planning.github.io/moveit_tutorials/doc/setup_assistant/setup_assistant_tutorial.html
- MoveIt! with Rviz tutorial: https://ros-planning.github.io/moveit_tutorials/doc/quickstart_in_rviz/quickstart_in_rviz_tutorial.html
Troubleshooting: If you have any problem related to pyassimp
, you probably want to download, build and install the assimp
package from source:
- Pull the latest version from assimp. https://github.com/assimp/assimp.git and build it.
mkdir build && cd build
make -j8
- Make install will copy it to
/usr/local/lib
.
make install
- Then go to
/port/PyAssimp
in the source folder and runpython setup.py install
. This should create the necessary files in/usr/local/lib/python2.7/dist-packages/pyassimp
.
This repository provides ROS support for the universal robots: https://github.com/olinrobotics/universal_robot
Clone the repository into your catkin workspace and make sure you are working with the hiro-xamyab
branch. Install the dependencies and build it:
cd ~/catkin_ws/src/
git clone https://github.com/olinrobotics/universal_robot.git
Before running catkin_make
, make sure to install all missing packages:
rosdep install --from-paths src --ignore-src -r -y
Finally, run catkin_make
:
cd ~/catkin_ws
catkin_make
To test your installation, run your simulated robot in Gazebo and fire up the MoveIt! node to perform control and planning tasks.
To bring up the simulated robot in Gazebo, run:
roslaunch ur_gazebo xamyab.launch grippers:=3
grippers:=GRIPPER_CODE determines the number of grippers we want to use. GRIPPERS_CODE:
- 0 = No gripper
- 1 = Gripper for left arm only
- 2 = Gripper for right arm only
- 3 = Grippers for both arms
For setting up the MoveIt! nodes to allow motion planning run:
roslaunch xamyab_moveit_config xamyab_moveit_planning_execution.launch grippers:=3
For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:
roslaunch xamyab_moveit_config moveit_rviz.launch
NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments limited:=true
.
- Change the initial position of a UR5 in Gazebo
- Add another arm to Gazebo
- Register MoveIt! controller to control both arms
- Attach a body to the two arms
- Connect two arms with one laptop
- Run MoveIt! with real arms
- Attach grippers to MoveIt! and Gazebo
- Attach a real depth camera to simulated Gazebo
- Add environment constraints to MoveIt!
- Attach a real camera with a real robot
- Work with the real gripper
- Write python scripts to control everything
If you need help, come find Merwan Yeditha [email protected] or Audrey Lee [email protected]!