turtlebot源码安装和daben安装的区别

发布网友 发布时间:2022-04-21 22:34

我来回答

1个回答

热心网友 时间:2023-06-27 10:58

1,安装依赖

sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator
ros-indigo-kobuki-ftdi ros-indigo-rocon-remocon ros-indigo-rocon-qt-library ros-indigo-ar-track-alvar-msgs

2,turtlebot软件包源安装(同样的在主机PC上也执行这些)

准备
> sudo apt-get install python-rosdep python-wstool ros-indigo-ros
> sudo rosdep init
> rosdep update
正式安装

可以在home目录下先建立一个文件夹在进入这个文件夹执行以下操作

> mkdir ~/rocon
> cd ~/rocon
> wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/indigo/rocon.rosinstall
> source /opt/ros/indigo/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make

> mkdir ~/kobuki
> cd ~/kobuki
> wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall
> source ~/rocon/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make

> mkdir ~/turtlebot
> cd ~/turtlebot
> wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall
> source ~/kobuki/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make

如果你已经新建了文件夹 source的时候记得更改目录 否则会出错

3,把setup.bash source到终端启动文件里

# For a deb installation
> echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
# For a source installation
> echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc

配置turtlebot与主机PC的通信
1,使用ifconfig查看自己的ip
2,安装ssh在turtlebot还有pc上

> sudo apt-get install openssh-server
像下面这样从pc远程进入turtlebot的电脑

> ssh turtle@<TURTLEBOTP_IP>

3,开始配置turtlebot的网络

> echo export ROS_MASTER_URI=http://localhost:11311 >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/.bashrc
> echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/turtlebot/devel/setup.sh
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/turtlebot/devel/setup.sh
配置完成 重启

IP_OF_TURTLEBOT 是turtlebot的ip地址
配置电脑的网络

> echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc
4,测试是否配置成功

> rostopic list
没有出现东西就是错的 (当然要首先打开roscore)

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com