This repo is based on RAI code, including its python bindings. See https://github.com/MarcToussaint/rai for a README of the RAI code.
This assumes a standard Ubuntu 18.04 machine.
WE DIDN'T GET TO RUN THIS WITH ANACONDA PYTHON. If you have Anaconda installed, please remove it from the PATH in .bashrc. The setup below will install the standard Ubuntu python3 and jupyter notebook.
In the PRACTICAL ROBOTICS COURSE (where we use ROS), change 'ROS = 0' to '#ROS = 0' in 'config.mk' before compilation. (Not applicable to Robotics Course WS 19/20, no need for ROS installation)
git clone https://github.com/MarcToussaint/robotics-course.git
cd robotics-course
git submodule init
git submodule update
make -j1 installUbuntuAll # calls sudo apt-get install; you can always interrupt
make -j4 # builds libs and tests
pip3 install --user jupyter
pip3 install --user matplotlib
jupyter-notebook docs/1-basics.ipynb
After loading the pr2 and the kitchen (running first 3 cells in the notebook), the simulator window should look similar to:
git submodule update
make dependAll
make -j4
- Basics: Configurations, Features & Jacobians
- Features: Learn about the language to define and query features and their Jacobians. Including querying collision features (whether and which objects are in collision).
Not applicable to Robotics Course WS 19/20
- Install ROS Kinetic
- Source and install
pip install wstools catkin_pkg --user
source /opt/ros/kinetic/setup.bash
- The following assumes all git repos are cloned into $HOME/git
- clone
mkdir -p ~/git
cd ~/git
git clone https://github.com/MarcToussaint/robotics-course.git
cd robotics-course
git submodule init
git submodule update
- change
ROS = 0
to#ROS = 0
inconfig.mk
- install also baxter sources using
cd external
./installBaxterSources.sh
- compile
make -j1 installUbuntuAll # calls sudo apt-get install; you can always interrupt
make -j4 # builds libs and tests
- if using c++, install
qtcreator
as described here - when in the lab, connect to the wifi mlr-robolab (password: mlr-robolab)
- call
source bin/baxterwlansetup.sh
from ~/git/robotics-course - source ROS and the baxter sources
source /opt/ros/kinetic/setup.bash
source external/devel/setup.bash
- IF YOU'RE THE ONLY ONE USING BAXTER, turn on baxter and call
bin/baxterStart.sh
- Try
rostopic list
- Try the cpp example
cd cpp/p1-baxterMini
make
./x.exe -useRos 1
- Try the python example
cd py/p1-motion
jupyter-notebook p1-motion.ipynb
- Before turning off baxter, run
rosrun baxter_tools tuck_arms.py -t
- ROS kinectic (for Ubuntu 16.04) or ROS melodic (for Ubuntu 18.04)
- OpenCV (4.0.1, from source)
- qtcreator (4.6.1 or ubuntu, setting up projects, pretty printers, source parsing)
- rai::Array and arr (tensors, arrays, std::vector)
- Features and Objectives for KOMO
- Graph and
.g
files (Python dictionaries, any-type container, file format, logic) - Editing robot model/configuration files (URDF, transformations, frame tree)
- docker (testing rai within docker, also Ubuntu 18.04)
On the back of the robot near the pedestal base, there is a power button. Push it and wait for the machine to finish booting.
Connect to the lab mlr-robolab WLAN (password: mlr-robolab)
Baxter runs with ROS, and you'll need to set your environment variables to enable ROS communication. The easiest way to do this is to connect to run one of following scripts in Terminal from the mlr folder:
source bin/baxterwlansetup.sh
Call the start-up script, which enables baxter, untucks the arms, turns off the ultrasonics (they click very loudly in any videos), and calibrates the grippers.
bin/baxterStart.sh
Kill /end_effector_publisher node which corrupts the /robot/joint_states. This only has to be run once when the robot is turned on.
rosnode kill /end_effector_publisher
Switch on the air pump. Pull and slowly turn the black valve to make the air pressure around 60-100psi (preferably 70 psi, the pressure will increase slowly so turn the valve slowly as it increases) Once the pressure is set the pump will automatically keep its pressure. Turn off air pump when finished using.
The gripper can be accessed same as the electric gripper.
- To launch the ASUS camera, install openni2. Change kinetic to a different ROS version in the command if you're not using Kinetic.
sudo apt-get install ros-kinetic-openni2-launch
Plug in the camera USB and run the following command.
roslaunch openni2_launch openni2.launch depth_registration:="true" hw_registered_processing:="true" color_depth_synchronization:="true" auto_exposure:="false" auto_white_balance:="false"
- To launch the Kinect camera, install freenect. Change kinetic to a different ROS version in the command if you're not using Kinetic.
sudo apt-get install ros-kinetic-freenect-stack
Plug in the camera USB and run the following command.
roslaunch freenect_launch freenect.launch camera:="kinect"
Always tuck the arms before shutting down, to keep the spring wear to a minimum.
bin/baxterTuck.sh
or
rosrun baxter_tools tuck_arms.py -t
Then press the power button once to turn the robot off.
Alternatively, you can ssh in to the robot (password: rethink) and run:
ssh [email protected]
sudo shutdown -h now
-
One some machines, OpenGL with the glfw seems broke. You'll have to change back to an older version which uses freeglut. For this, in
rai/Gui/Makefile
switch the 0/1 forFREEGLUT
andGLFW
-
Beware ros node names!! (Maybe it is good if everybody uses the same rosNodeName? That way they block each other? Behavior undefined!)