-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc_iCub
61 lines (55 loc) · 2.6 KB
/
.bashrc_iCub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#===============================================================================
# Title: bashrc_iCub.sh
# Description: this is the iCub enviroment file - SUPERBUILD version
# Date: 2021-MAR-02
# Usage: source bashrc_iCub.sh
#===============================================================================
if [ "$PS1" ]; then
echo "Setting up yarp and iCub env vars"
fi
# YARP and iCub enviroment variables
export ROBOT_CODE=/usr/local/src/robot
# Set the name of build path here
export ROBOTOLOGY_SUPERBUILD_SOURCE_DIR=${ROBOT_CODE}/robotology-superbuild
export YARP_SOURCE_DIR=${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/src/YARP
export ICUB_SOURCE_DIR=${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/src/ICUB
export icub_firmware_shared_SOURCE_DIR=${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/src/icub_firmware_shared
export ICUBcontrib_DIR=${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/src/icub-contrib-common
# Change the name of build path here, according to your needs
export OBJ_SUBDIR="build"
if [ "$OBJ_SUBDIR" != "" ]; then
# Project-specific variables
export ROBOTOLOGY_SUPERBUILD_BUILD_DIR=${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/${OBJ_SUBDIR}
export ROBOTOLOGY_SUPERBUILD_INSTALL_DIR=${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/install
export YARP_BUILD_DIR=${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/src/YARP
export ICUB_BUILD_DIR=${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/src/ICUB
export icub_firmware_shared_BUILD_DIR=${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/src/icub_firmware_shared
export ICUBcontrib_BUILD_DIR=${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/src/ICUBcontrib
# Source the enviroment variables needed by the superbuild
if [ -f ${ROBOTOLOGY_SUPERBUILD_INSTALL_DIR}/share/robotology-superbuild/setup.sh ]; then
source ${ROBOTOLOGY_SUPERBUILD_INSTALL_DIR}/share/robotology-superbuild/setup.sh
fi
fi
# To enable tab completion on yarp port names
if [ -f ${YARP_SOURCE_DIR}/data/bash-completion/yarp ]; then
source ${YARP_SOURCE_DIR}/data/bash-completion/yarp
fi
# Set the name of your robot here.
# export YARP_ROBOT_NAME=
if [ "$YARP_ROBOT_NAME" = "" ] && [ -f "${ROBOT_CODE}/yarp_robot_name.txt" ]
then
export YARP_ROBOT_NAME=$( head --lines=1 ${ROBOT_CODE}/yarp_robot_name.txt )
fi
# Set-up optimizations
export CMAKE_BUILD_TYPE=Release
# DebugStream customization
export YARP_VERBOSE_OUTPUT=0
export YARP_COLORED_OUTPUT=1
export YARP_TRACE_ENABLE=0
export YARP_FORWARD_LOG_ENABLE=0
# Drivers section
DRIVER_ROOT=/lib/modules/$(uname -r)/iCubDrivers/
# to be used if the corresponding hardware is mounted on the robot
#export ESDCANAPI_DIR=${DRIVER_ROOT}/esdCanApi/
#export PLXCANAPI_DIR=${DRIVER_ROOT}/plxCanApi/
export CFW2CANAPI_DIR=${DRIVER_ROOT}/cfw002/