TurtleBOT3

ubuntu更换源

sudo cp /etc/apt/sources.list /etc/apt/sources_backup.list
sudo gedit /etc/apt/sources.list

阿里源

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

 安装ROS 


$ sudo apt-get update
$ sudo apt-get upgrade
$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_kinetic.sh && chmod 755 ./install_ros_kinetic.sh && bash ./install_ros_kinetic.sh

安装ROS依赖包

$ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers
$ cd ~/catkin_ws/src/
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
$ cd ~/catkin_ws && catkin_make

 安装仿真

$ cd ~/catkin_ws/src/
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
$ cd ~/catkin_ws && catkin_make

更改模型

$ gedit ~/.bashrc
export TURTLEBOT3_MODEL=burger

控制虚拟TurtleBot3在RVIZ里,通过teleoperation节点。

$ export TURTLEBOT3_MODEL=${TB3_MODEL}
$ roslaunch turtlebot3_fake turtlebot3_fake.launch
$ export TURTLEBOT3_MODEL=${TB3_MODEL}
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

出现如下错误

ERROR: cannot launch node of type [turtlebot3_teleop/turtlebot3_teleop_key]: can't locate node [turtlebot3_teleop_key] in package [turtlebot3_teleop]

更改py文件脚本权限,以及Allow executing files as program

虚拟机运行gazebo错误:

[gazebo-2] process has died [pid 21538, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/bodom/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/worlds/turtlebot3_world.world __name:=gazebo __log:=/home/bodom/.ros/log/ca84e4fe-f177-11e9-8196-000c295f5120/gazebo-2.log].
log file: /home/bodom/.ros/log/ca84e4fe-f177-11e9-8196-000c295f5120/gazebo-2*.log

解决虚拟机显示问题:

echo "export SVGA_VGPU10=0" >> ~/.bashrc
source ~/.bashrc

 

posted @ 2019-10-18 12:18  bodom0202  阅读(435)  评论(0编辑  收藏  举报