1 下载Ubuntu 14.04.5
2 配置安装ROS indigo
可以试一下镜像传送门
即使执行update没成功,也可以尝试安装。
udo sh -c '. /etc/lsb-release && echo "deb http://mirror.umd.edu/packages.ros.org/ros/ubuntu $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-indigo-desktop-full
3 rbx1仿真
传送门
终于找到一个能用的。
3.1 准备工作
(1)gmapping:
git clone https://github.com/ros-perception/slam_gmapping.git
(2)amcl:
git clone https://github.com/ros-planning/navigation.git
(3)可能用到的package:
执行以下命令即可
sudo apt-get install ros-indigo-turtlebot-bringup \
ros-indigo-turtlebot-create-desktop ros-indigo-openni-* \ros-indigo-openni2-* ros-indigo-freenect-* ros-indigo-usb-cam \ros-indigo-laser-* ros-indigo-hokuyo-node \ros-indigo-audio-common gstreamer0.10-pocketsphinx \
ros-indigo-pocketsphinx ros-indigo-slam-gmapping \
ros-indigo-joystick-drivers python-rosinstall \
ros-indigo-orocos-kdl ros-indigo-python-orocos-kdl \python-setuptools ros-indigo-dynamixel-motor-* \
libopencv-dev python-opencv ros-indigo-vision-opencv \
ros-indigo-depthimage-to-laserscan ros-indigo-arbotix-* \ros-indigo-turtlebot-teleop ros-indigo-move-base \ros-indigo-map-server ros-indigo-fake-localization \ros-indigo-amcl git subversion mercurial
(4)rbx1 package 的下载:
cd ~/catkin_ws/src
git clone https://github.com/pirobot/rbx1.git
cd rbx1
git checkout indigo-devel
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash
rospack profile
3.2 测试
我们主要使用arbotix_python仿真器来测试代码应用到机器人上面的效果,之前的一堆指令中已经安装过arbotix。现在先在终端中输入roscore指令。
然后启动仿真的TurtleBot机器人。再打开一个终端,启动fake_turtlebot.launch文件。
roslaunch rbx1_bringup fake_turtlebot.launch
rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz
接着发布Twist消息来控制机器人的运动。
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.2, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}
轮子声明:以上第三节内容来自:yoyo_sincerely,谢博主博客让我终于能够运行起来一个虚拟仿真机器人,搬到此处方便自己和他人查看
如果出现以下情况:
捕获.PNG是因为电脑配置低,主要是内存不足。
网友评论