-
Notifications
You must be signed in to change notification settings - Fork 14
simulator development
Follow this step-by-step guide to start developing with simulated robots. Make sure to complete the initial setup before proceeding further.
Content:
Note 1: If no Nvidia drivers are present, the Docker runtime is set to
runc
, instead ofnvidia
, to bypassnvidia-docker2
when entering the container. However, 3D accelerated tools, including Gazebo and Rviz, will most likely not work. You can modify the default runtime in~/.bashrc
.
It is recommended to use Terminator with a split window view. It makes the process much easier. To start up a Terminator window with a pre-configured view, use one of the following commands, depending on your machine setup.
For a single machine:
cd ~/o2ac-ur && ./LAUNCH-TERMINATOR-TERMINAL.sh
For the split setup with a real-time kernel, use these lines for the vision and robot PC respectively:
cd ~/o2ac-ur && ./LAUNCH-TERMINATOR-TERMINAL.sh vision
cd ~/o2ac-ur && ./LAUNCH-TERMINATOR-TERMINAL.sh rt
Caution: The shell script overwrites your Terminal configuration file. Start it from a non-Terminator terminal while Terminator is closed.
You can also enter the docker container manually in any terminal:
cd ~/o2ac-ur && sh RUN-CONTAINER.sh
Remember that you can split Terminator terminals horizontally and vertically (Ctrl+E, Ctrl+O).
-
Enter the Docker container as described above.
-
To start the robots in kinematic-only simulation (MoveIt), execute this:
roslaunch o2ac_moveit_config demo.launch
If you encounter xacro errors, see troubleshooting.
-
OPTIONAL: (Not maintained) To simulate cameras, physical parts and dynamics, you should launch Gazebo via
roslaunch
, and then MoveIt from a separate terminal window:roslaunch o2ac_gazebo o2ac_gazebo.launch roslaunch o2ac_moveit_config o2ac_moveit_planning_execution.launch sim:=true
See the ReadMe in the o2ac_moveit_config package for more details on how to move the robots with the MoveIt GUI. For sending motion commands from another node, read the below.
-
Inside the Docker container, start a ROS node running e.g. the assembly task:
rosrun o2ac_routines assembly.py
-
The script starts up a command line interface. Use it to run the functions you wish to execute, or simply type "start" and press Enter to see the robot perform the assembly.
Check the other executable files in the o2ac_routines package (taskboard.py
, calibration.py
, osx_view_testing.py
) to see more examples.
-
If Gazebo is running, it is publishing the different camera streams as rostopics. To display an image stream:
rosrun rqt_image_view rqt_image_view
You can use
rostopic list
to see other available data streams.