Note: This tutorial assumes that you have complete the previous tutorials: roch_bringup, ROS enviroment variables and How to configure enviroment.
(!) 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.

Changing env about roch

Description: Check out and configure env variables on Roch.

Tutorial Level: BEGINNER

Next Tutorial: Using package of roch_follower

Env on Roch

This assumes that you hav a Roch and configuration has done.

Now, Let's check out how many variables of environment on Roch, typing following command:

  • export | grep ROCH_

or

  • env | grep ROCH_

After preceding command you will get following output :

  • declare -x ROCH_3D_SENSOR="astra"
    declare -x ROCH_3D_SENSOR_ENABLE="TRUE"
    declare -x ROCH_3D_SENSOR_NAV_ENABLE="FALSE"
    declare -x ROCH_BASE="roch"
    declare -x ROCH_BATTERY
    declare -x ROCH_DESCRIPTION="/home/carl/test_husky/src/roch_v106120170117172/roch_project/roch/roch_description/robots/roch_standard_asus_xtion_pro.urdf.xacro"
    declare -x ROCH_GAZEBO_DESCRIPTION="/home/carl/test_husky/src/roch_v106120170117172/roch_project/roch_simulator/roch_gazebo/urdf/description.gazebo.xacro"
    declare -x ROCH_GAZEBO_MAP_FILE="/home/carl/test_husky/src/roch_v106120170117172/roch_project/roch_simulator/roch_gazebo/maps/sawyer_playgen.yaml"
    declare -x ROCH_GAZEBO_WORLD_FILE="/home/carl/test_husky/src/roch_v106120170117172/roch_project/roch_simulator/roch_gazebo/worlds/sawyer_playgen.world"
    declare -x ROCH_INTERACTIONS_LIST="[roch_bringup/admin.interactions, roch_bringup/documentation.interactions, roch_bringup/pairing.interactions, roch_bringup/visualisation.interactions]"
    declare -x ROCH_LASER="rplidar"
    declare -x ROCH_LASER_ENABLE="FALSE"
    declare -x ROCH_MAG_CONFIG=""
    declare -x ROCH_MAP_FILE="/home/carl/test_husky/src/roch_v106120170117172/roch_project/roch/roch_navigation/maps/willow-2010-02-18-0.10.yaml"
    declare -x ROCH_NAME="roch"
    declare -x ROCH_RAPP_PACKAGE_BLACKLIST="[]"
    declare -x ROCH_RAPP_PACKAGE_WHITELIST="[rocon_apps, roch_rapps]"
    declare -x ROCH_SERIAL_PORT="/dev/roch"
    declare -x ROCH_SIMULATION="false"
    declare -x ROCH_STACKS="standard"
    declare -x ROCH_TYPE="roch"

Change Values

We had checkout environment variables about Roch, and now we should change the values that we don not wanner such as ROCH_3D_SENSOR is astra we don not want, we can change the value to we need such as xtion, astra.

Now there have some ways to change the values.

Command-line

We can use following command to change values which we don not wanner, like we change ROCH_LASER to rplidar:

  • export ROCH_LASER=rplidar

Typing following command to check out:

  • env | grep ROCH_LASER

Once you close current terminal, the value of ROCH_LASER will recovery to rplidar, so we should get a permanent ways to keep values not change.

.bashrc file

The .bashrc file will do we wanner, once we put our values into .bashrc file, the values will never change until you change value in .bashrc.

Open ~/.bashrc file using your favorite editor, such as gedit:

  • gedit ~/.bashrc

Adding following lines at end of .bashrc file:

  • export ROCH_BASE=roch
    export ROCH_STACKS=standard
    export ROCH_3D_SENSOR=astra     #for now have four support sensor [ asus_xtion_pro, kinect, r200, astra]
    export ROCH_LASER=rplidar               #for now have two support laser [ ls01c, rplidar]
    export ROCH_3D_SENSOR_ENABLE=true
    export ROCH_3D_SENSOR_NAV_ENABLE=false
    export ROCH_LASER_ENABLE=true

Close file and reopen terminal, using following command to checkout:

  • env | grep ROCH_

Wiki: roch/Tutorials/Changing env of roch (last edited 2017-07-21 06:48:17 by SawYer)