Skip to content

robot development

Felix von Drigalski edited this page Oct 1, 2021 · 1 revision

Robot Development

Follow this step-by-step guide to start developing on the real robots. Make sure to complete the initial setup before proceeding further. If you encounter problems, look at this troubleshooting guide first.

Note: If no Nvidia GPU is present, run cd ~/o2ac-ur && export DOCKER_RUNTIME=runc && sh RUN-CONTAINER.sh to bypass nvidia-docker2 when entering the container. 3D accelerated graphics/tools (such as Gazebo and Rviz) will not work.

Step 0: Start up your terminals

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

Step 1: Start up the controllers

Make sure that your robot(s) are running, and the safety button is released.

  1. Set up the IP of your machine in the host OS. For running on a single machine or RT kernel: o2ac-ur, IP 192.168.2.5, For two machines: o2ac-vision-pc, IP 192.168.2.6 for the vision PC.

    Switch to the network that connects to your robots. You may have to disable WiFi and other networks. Test the connection by pinging the UR5 robots, e.g.:

    ping 192.168.1.42  (for b_bot)
    ping 192.168.1.41  (for a_bot)

    If your IP addresses are different, you need to change the IP arguments in connect_real_robots.launch accordingly.

  2. Run roscore in one of the terminals on the vision PC (or your single PC).

  3. On your robot PC (or single PC), bring up the robot drivers, robot description and gripper drivers via roslaunch:

    roslaunch o2ac_scene_description connect_real_robots.launch
  4. On each UR robot, make sure that Remote Control is enabled in the top right.

    Optional: You can start the "External Control" program. To start up the program, tap Program Robot, then Load Program, then ROS_external_control.urp, then press the button with the Play symbol (Triangle).

    The line Robot ready to receive control commands will be displayed in the terminal when the program is successfully connected.

    You should stop and restart this program when protective stops or crashes occur.

  5. Start up MoveIt! and Rviz, to visualize the scene and allow motion planning:

    roslaunch o2ac_moveit_config o2ac_moveit_planning_execution.launch

    You should be able to see the real robot positions in Rviz. If you do not see the correct robot pose, something is wrong. Stop and troubleshoot before continuing!

  6. Launch the skill server, which offers the high-level actions we use to build routines.

    roslaunch o2ac_skills o2ac_skill_server.launch

Step 2: Use high-level actions to write routines

Now you can write routines such as the examples in the o2ac_routines package.

  1. Launch an example from the o2ac_routines package:

    roslaunch o2ac_routines calibration.py

Step 3: Full start up the controllers for WRS2020

Assuming that you are working with a two-PCS station (Vision & RT Kernel):

  1. Connect to the Docker container of the Vision PC via TERMINATOR launch file to access the necessary terminals

    cd ~/o2ac && ./LAUNCH-TERMINATOR-TERMINAL.sh vision
  2. Start in order:

    1. ROS core: roscore
    2. Cameras: roslaunch o2ac_scene_description osx_bringup_cameras.launch
    3. Vision system: roslaunch o2ac_vision o2ac_vision.launch
  3. Connect to the Docker container of the RT Kernel PC via TERMINATOR launch file to access the necessary terminals

    cd ~/o2ac && ./LAUNCH-TERMINATOR-TERMINAL.sh vision rt
  4. Start in order:

    1. Robots: roslaunch o2ac_scene_description connect_real_robots.launch
    2. Moveit: roslaunch o2ac_moveit_config o2ac_moveit_planning_execution.launch
  5. Start main script rosrun o2ac_routines assembly.py or rosrun o2ac_routines taskboard.py

Other packages contain executable code. See the readme of each package for more information and examples.

  1. If you are using the Panda, start up the Panda's desktop PC (osx-panda-desk, IP 192.168.2.6), open Chrome on it and unlock the joints in the Panda Desk web interface. In a terminal on the Panda desktop PC, run roslaunch franka_control osx_franka_control.launch

Note: Short troubleshooting notes for the Panda; see here for more

  • If the joints cannot be unlocked or something is wrong, restart the end effector.
  • If there are connection errors, make sure WiFi is off. It needs to be disabled when you use the robots.
  • If an error is displayed, simply restart the controller with roslaunch franka_control osx_franka_control.launch
  • You need to connect to the Panda via browser at the IP 192.168.1.10 to unlock its joints using the panda-desk PC.