This document describes how to setup and run a demonstration of the current state in our laboratory.
The setup is divided into the setup steps for the robot and the setup steps on the compute. The order should be:
- Robot
- Computer
- Switch on the robot
- (Optional) Charge the robot
- Connect the charging cable
- Select the KMR robot on the controller
- Activate the charging process by navigating to BMS -> Charging Process Control -> press the
Start socket charge
button
- Select the IIWA robot
- Put the robot into its automatic control mode (turn the key, select AUT and then turn the key back)
- Select the T1FRITorqueControl Application, start it and navigate through the menus:
- Magic! (Attention: the arm will spin quite fast to its starting position when this button is pressed!)
- Calc
- 1
- Turn on the computer (Note: Sometimes it does not boot if USB devices are connected. Then just unplug all USB cables.)
- Connect all required cables:
- Two LAN cables have to be connected to the correct ports on the robot as well as the correct ports of the computer.
- Connect the USB cable of the camera. For the best camera video resolution, it has to be connected to the port marked with SS on the back of the computer.
- Connect the USB cable of the gripper.
- Run verify_demo.zsh
$HOME/system/flexassembly_dev_ws/src/py-flex-assembly/demo/verify_demo.zsh
to verify that all cables are connected correctly. The script will also query you to provide the sudo password to setup permissions for the gripper device file if not already set. - Now there are two options: If you are familiar with tmux, you can start the script start_demo_tmux.zsh
$HOME/system/flexassembly_dev_ws/src/py-flex-assembly/demo/start_demo_tmux.zsh
which will start all required components in a tmux session, or you start them by hand:- Terminal 1:
source /opt/ros/noetic/setup.zsh
roscore
- Terminal 2:
source ${HOME}/system/flexassembly_dev_ws/devel/setup.zsh
python3 $HOME/system/flexassembly_dev_ws/src/py-flex-assembly/gym_flexassembly/applications/app_gripper_if.py
- Terminal 3: (Note: the order in which the envs are sourced is important)
source ${HOME}/system/flexassembly_dev_ws/devel/setup.zsh
source /opt/xbot/setup.sh
rosrun rtt_ros deployer $HOME/system/flexassembly_dev_ws/src/cosima-controller/scripts/real_tests/test_real_qp.ops
- Terminal 4:
source ${HOME}/system/flexassembly_dev_ws/devel/setup.zsh
cd ${HOME}/system/flexassembly_dev_ws/src/py-flex-assembly
python3 -m gym_flexassembly.vision.pose_detection.projection.pose_service --side_model gym_flexassembly/vision/pose_detection/projection/side_model.pth --debug
- Terminal 5:
source ${HOME}/system/flexassembly_dev_ws/devel/setup.zsh
- Terminal 1:
- In terminal 5 (tmux window demo), the commands for starting the demo have to be executed. In the tmux session they will already be written out so that only pressing enter remains. (ATTENTION: currently the vision only supports the detection of a single clamp. Thus only a single one should be placed on the table. In addition, wile the scripts are running make sure to have a hand on the emergency shutdown at all times.) There are two options:
python3 $HOME/system/flexassembly_dev_ws/src/py-flex-assembly/gym_flexassembly/applications/app_coord_assemble_lever.py
This can only be used to place the first clamp, because of the way the robot moves the clamp on the rail.python3 $HOME/system/flexassembly_dev_ws/src/py-flex-assembly/gym_flexassembly/applications/app_coord_assemble_bump.py
This command can be used either to place the first or the second clamp on the rail.
- Sometimes the movement component will crash. Then, a red error message is displayed on the robot controller. To fix this, perform the following steps:
- Stop the movement server on the computer (started in Terminal 3, tmux window movement).
- Restart the application on the robot (step 5.).
- Restart the movement server on the computer.