Skip to content

simulator development

Felix von Drigalski edited this page Nov 26, 2019 · 1 revision

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 of nvidia, to bypass nvidia-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.

Step 1: Launch the Simulator

  1. Run the Docker container:

cd ~/ur-o2as && sh RUN-CONTAINER.sh
 ```
  1. If you only want to run the robots, execute this:

     roslaunch o2as_moveit_config demo.launch
  2. Alternatively, if you need to simulate cameras and parts, you should launch Gazebo via roslaunch, and then MoveIt from a separate terminal window:

    roslaunch o2as_gazebo o2as_gazebo.launch
    roslaunch o2as_moveit_config o2as_moveit_planning_execution.launch sim:=true

Step 2: Send motion commands to the robots in the simulation

See the ReadMe in the o2as_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.

  1. Enter the Docker container from a new terminal window:

    cd ~/u2-o2as/ && ./RUN-DOCKER-CONTAINER.sh
  2. Use MoveIt from inside a ROS node. Example:

    roslaunch o2as_examples example_tf_moveit.launch

    The example above requires MoveIt to be launched. See Step 1 or the readme of o2as_moveit_planner for more information.

Step 3: Observe camera images, extract depth data

  1. 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.

Step 4: Use high-level actions to make a routine

  1. Start up the skill server:

    roslaunch o2as_skill_server o2as_skill_server.launch
  2. Check the example in the o2as_routines package, which shows how to make a Python script using the high-level actions offered by the skill server.