This repository contains all file needed to run a framework to do data collection using ROS and Gazebo
Software | Version |
---|---|
OS | Ubuntu 20.04 |
ROS | Noetic Ninjemys |
Python | 3.8.10 |
Gazebo | 11.10.2 |
Following the ubuntu install of ROS Noetic
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl -y
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-ros-base -y
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential -y
sudo rosdep init && rosdep update
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt update
sudo apt-get install python3-catkin-tools -y
sudo apt install ros-noetic-moveit ros-noetic-controller-interface ros-noetic-control-toolbox ros-noetic-eigen-conversions ros-noetic-gazebo-ros ros-noetic-controller-manager ros-noetic-tf-conversions ros-noetic-robot-state-publisher ros-noetic-rqt ros-noetic-rqt-controller-manager ros-noetic-rqt-publisher ros-noetic-rqt-image-view ros-noetic-rqt-graph ros-noetic-gazebo-plugins ros-noetic-gazebo-ros-control ros-noetic-gazebo-ros-pkgs ros-noetic-robot-mechanism-controllers ros-noetic-joint-state-publisher ros-noetic-joint-state-controller ros-noetic-transmission-interface ros-noetic-position-controllers ros-noetic-joint-trajectory-controller ros-noetic-franka-description -y
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/ros-industrial/universal_robot.git
git clone https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers.git
git clone https://github.com/JenniferBuehler/gazebo-pkgs.git
git clone https://github.com/JenniferBuehler/general-message-pkgs.git
git clone https://github.com/shadow-robot/smart_grasping_sandbox.git
git clone https://github.com/cu-asl/robot_data_collection_framework.git
cd ~/catkin_ws
catkin build
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
roscd ur5_data_collect_fw/scripts
chmod +x *
sudo apt install python3-pip -y
pip3 install pandas psutil urdfpy
Use run_loop.py with the following arguments
1 (default) - UR5 peg in hole with joint trajectory controller
2 - UR5 peg in hole with cartesian compliance controller
3 - UR5 pick and place with joint trakectory controller
4 - Panda peg in hole with joint trajectory controller
default - config/item_spawn.xml
default - 0 (all config)
default - 300
roscd ur5_data_collect_fw/scripts
python3 run_loop.py -task 1 -open config/world_random_peg/1 -timeout 60 -num_open 3
Gazebo will be opened and the simulation of peg inserting to a hole will run
35 files should be created in the newest folder (highest number) in ur5_data_collect_fw/rec
roscd ur5_data_collect_fw/scripts
python3 run_loop.py -task 3 -open config/world_random_pick/1 -timeout 240 -num_open 3
Gazebo will be opened and the simulation of picking and placing objects will run
34 files should be created in the newest folder (highest number) in ur5_data_collect_fw/rec
There are 10% chance that output as video or snapshot might not be generated due to the error of the recording program
ctrl
+z
at the terminal running run_loop.py- In terminal, type
ps aux | grep roslaunch
- Kill the second process from the last