[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: Installation.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Get the milk

Description: This tutorial teaches you how to run the get milk script.

Tutorial Level: BEGINNER

Next Tutorial: Detailed explanation

If you have Care-O-bot related questions or discover Care-O-bot specific problems please contact us via the Care-O-bot mailinglist.

Set environment variables

To execute the following commands, you have to specify the ROBOT and ROBOT_ENV variable. More information about the variables can be found on the general Care-O-bot page. Either export the variables in each terminal with

export ROBOT=cob3-1
export ROBOT_ENV=ipa-kitchen

or add set them automatically for all terminals with

echo "export ROBOT=cob3-1" >> ~/.bashrc
echo "export ROBOT_ENV=ipa-kitchen" >> ~/.bashrc
source ~/.bashrc

Running the script

In order to run the get_milk script you need to take the following steps. Start each step in a new terminal window. For a more detailed explanation for the individual steps please have a look at the detailed explanation page.

Start the roscore


Start the get_milk launch file

roslaunch srs_get_milk get_milk.launch

Spawn the milk box in Gazebo

roslaunch cob_gazebo_worlds milk_box.launch

Start rviz

rosrun rviz rviz -d ~/git/care-o-bot/srs/srs_get_milk/get_milk.vcg

Start the get_milk script

rosrun srs_get_milk get_milk.py

Hit return in the script terminal "Wait for user input..." is prompted.

Optional steps

This steps are not neccesarry, but help you to understand what's going on.

Start the dashboard

roslaunch cob_dashboard dashboard.launch

Start the script_viewer (live)

rosrun cob_script_server script_viewer

Generate a graph from the script

roscd srs_get_milk/ros/scripts
rosrun cob_script_server script_to_graph.py get_milk.py
eog get_milk.png

You should see a graph like this


2020-02-22 13:16