2019-07-15 RK3399_Ubuntu16.04_ROS_Rtabmap

1. Installing ROS Kinetic

Setup your sources.list

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

Set up your keys

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Make sure your Debian package index is up-to-date

sudo apt-get update

Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

sudo apt-get install ros-kinetic-desktop-full

Initialize rosdep

sudo rosdep init

rosdep update

Environment setup

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrcsource ~/.bashrc

Dependencies for building packages

sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

2. Installing Turtlebot2

rocon

mkdir ~/rocon

cd ~/rocon

wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/kinetic/rocon.rosinstall

source /opt/ros/kinetic/setup.bash

rosdep install --from-paths src -i -y

catkin_make

kobuki

mkdir ~/kobuki

cd ~/kobuki

wstool init -j5 src https://raw.githubusercontent.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/kobuki.rosinstall

source ~/rocon/devel/setup.bash

rosdep install --from-paths src -i -y

catkin_make

turtlebot

mkdir ~/turtlebot

cd ~/turtlebot

wstool init -j5 src https://raw.github.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/turtlebot.rosinstall

source ~/kobuki/devel/setup.bash

rosdep install --from-paths src -i -y

catkin_make

.bashrc

echo "source ~/rocon/devel/setup.bash" >> ~/.bashrc

echo "source ~/kobuki/devel/setup.bash" >> ~/.bashrc

echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc

Creating kobuki 

rosrun kobuki_ftdi create_udev_rules

Installing kinect_v1 driver

sudo apt-get install ros-kinetic-openni-* ros-kinetic-openni2-* ros-kinetic-freenect-*

echo "export TURTLEBOT_3D_SENSOR=kinect" >> ~/.bashrc

echo TURTLEBOT_3D_SENSOR

3. Installing Rtbmap from source code

Dependencies for Rtabmap(Qt, PCL, VTK, OpenCV, ...)

sudo apt-get install ros-kinetic-rtabmap ros-kinetic-rtabmap-ros

sudo apt-get remove ros-kinetic-rtabmap ros-kinetic-rtabmap-ros

Installing rtabmap

cd ~

git clone https://github.com/introlab/rtabmap.git rtabmap

cd rtabmap/build

cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel ..

make -j1

make install

Installing rtabmap_ros

cd ~/catkin_ws

git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros

catkin_make -j1

4.Running Rtabmap with Turtlebot2

Mapping

roslaunch turtlebot_bringup minimal.launch

roslaunch rtabmap_ros demo_turtlebot_mapping.launch

roslaunch rtabmap_ros demo_turtlebot_rviz.launch (rosrun rviz rviz -d turtlebot_navigation.rviz)

Localization

roslaunch rtabmap_ros demo_turtlebot_mapping.launch localization:=true

你可能感兴趣的:(2019-07-15 RK3399_Ubuntu16.04_ROS_Rtabmap)