为什么.bashrc中export ros

 我来答
匿名用户
2017-06-27
展开全部
[html] view plain copy
source /opt/ros/indigo/setup.bash

###### kobuki_slam

source /opt/ros/indigo/setup.bash
source /home/yhzhao/catkin_ws/devel/setup.bash
source /home/yhzhao/hl_ws/devel/setup.bash

#export ROS_PACKAGE_PATH=~/catkin_ws/src:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=~/catkin_ws/src:~/hl_ws/src:$ROS_PACKAGE_PATH
export ROS_WORKSPACE=~/hl_ws/src

alias sbpi='ssh bananapi@192.168.1.102'
alias bpi_ros='export ROS_MASTER_URI=http://192.168.1.102:11311 && export ROS_HOSTNAME=192.168.1.123'
alias cdros='cd ~/catkin_ws/src'

declare -x TURTLEBOT_GAZEBO_MAP_FILE="/opt/ros/indigo/share/turtlebot_gazebo/maps/corridor.yaml"
declare -x TURTLEBOT_GAZEBO_WORLD_FILE="/opt/ros/indigo/share/turtlebot_gazebo/worlds/corridor.world"

export TURTLEBOT_BASE=kobuki
export TURTLEBOT_STACKS=nostack
export TURTLEBOT_3D_SENSOR=rplidar

###### slam_ws
source /opt/ros/indigo/setup.bash
source /home/yhzhao/slam_ws/devel/setup.bash

export ROS_PACKAGE_PATH=~/slam_ws/src:$ROS_PACKAGE_PATH
export ROS_WORKSPACE=~/slam_ws/src

#export ROS_HOSTNAME=192.168.1.111
#export ROS_IP=192.168.1.111

###### rgbd_slam
#source /opt/ros/indigo/setup.bash
#source /home/yhzhao/rgbdslam_ws/devel/setup.bash
#source /home/yhzhao/rgbdslam_ws/devel/setup.bash

#export ROS_PACKAGE_PATH=~/rgbdslam_ws/src:$ROS_PA#CKAGE_PATH
#export ROS_WORKSPACE=~/rgbdslam_ws/src

###### rtab_ws
#source /opt/ros/indigo/setup.bash
#source /home/yhzhao/slam_open_sources/ros_ws/devel/setup.bash

#export ROS_PACKAGE_PATH=/home/yhzhao/slam_open_sources/ros_ws/src:$ROS_PACKAGE_PATH
#export ROS_WORKSPACE=/home/yhzhao/slam_open_sources/ros_ws/src

#source ~/rosbuild_ws/setup.bash

在bashrc中进行上面设置的原因,主要是在每次启动终端时,加载ros的配置变量,不然基本的ros指令就无法识别,也找不到对应包..
source 可以认为它是读取每一个环境变量设置. 支持覆盖重载..
ros一般在apt-get 安装下是装在/opt/ros/indigo/ 下面的, 可以认为它只安装了头文件和基本库的 release版本, 如果我们需要下载对应的源码, 最好在home文件夹下,创建
自己的工作空间, 再编译. 按照source 的次序支持包覆盖.
ROS_PACKAGE_PATH ros包查找的路径.
ROS_WORKSPACE 工作路径 . roscd 对应的位置.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式