====== Playing with UR robot ====== This page provides a few information on setting up the robot. ===== Installation ===== Installation could be done with Docker or without: * using [[https://gitlab.inria.fr/braillon/ur_robotiq | Docker]] with `launch_docker.sh` * directly on a machine with Ubuntu 18.04 -- you can follow this [[https://github.com/ikalevatykh/willbot_workspace/blob/melodic-devel/scripts/ros-install.sh | script]] > The latter installation script is experimental. Take it carefully. ===== Init robot nodes (**Coming soon!**) ===== TODO: First steps, how to init the robot. Then, let's add here an image of the nodes and TF tree that should be running. It is one of the best ways to check if everything is running as expected. ==== Checking: TF Tree (**Coming soon!**) ==== TODO: Image with TF Tree + Date of image and docker version. ==== Checking: ROS Nodes (**Coming soon!**) ==== TODO: Image with ROS Nodes + Date of image and docker version. ===== Camera Calibration (**Coming soon!**) ===== TODO: Explain how to use ar track alvar and configure it. ===== Willbot Stack (**Coming soon!**) ===== TODO: Important parts for newbies to make it easier to digest. ===== Gathering a real dataset (**Coming soon!**) ===== TODO: How to run real dataset gathering and possible pitfalls ===== Launching scripts ===== Due to a bug on the gripper initialization, the robot should be started from Docker. Open several terminals with [[https://github.com/tmux/tmux|tmux]] or [[https://linux.die.net/man/1/screen|screen]]. <code bash> # first terminal: launch ROS + rosnode for the robot $ roslaunch willbot_bringup willbot_real.launch setup:=grenoble camera:=kinect2 # second terminal: launch server to communicate with external python script $ roslaunch willbot_envs server.launch _debug:=True </code> Then, you can start from a third terminal in the Docker (or outside of Docker) your code. You will need then to source ROS packages. Unless you installed them in your home folder, you can source `/home/pguhur/ros_ws/devel/setup.bash`. ===== Building a ROS workspace ===== You can build your own workspace for ROS following instructions from the install script from [[https://github.com/ikalevatykh/willbot_workspace/blob/melodic-devel/scripts/ros-install.sh#L128 | line 128]]. ===== ROS Bag ===== Because the robot might do some random errors, one might want to record topics in order to find a reproducible setup. Recording can easily done with a ROS bag as such: <code xml> <arg name="record" default="true" /> <node pkg="rosbag" type="record" name="rosbag_record" args="record -o /local_scratch/sim2real/rosbag/simu /arm/joint_states /arm/ur_driver/joint_speed /kinect2/sd/image_depth/compressed" if="$(arg record)" /> </code> ===== Debugging ===== You can find a great introduction to debug [[https://bluesat.com.au/a-dummys-guide-to-debugging-ros-systems/ | here]] ===== Troubleshooting (**Coming soon!**) ===== TODO: Add common pitfalls and solutions