Skip to content

NOEMOJI041/Point-Cloud-Navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MR-Robot

MR. Robot: Modular Robot

INTRODUCTION

This package was created as part of the Autonomous Navigation tutorial for MR. Robot. It provides configuration for SLAM and autonomous navigation for MR. Robot equipped with Depth and LiDAR sensors.

INSTALLATION

MR. Robot setup

Clone MR. RObot repository into cd catkin_ws/src/

[email protected]:atom-robotics-lab/MR-Robot.git

Now we will use catkin make command to get the ROS on our system to recognise the examples.

cd ..
catkin_make

Source the setup file in newly created ‘devel’ directory so that our ROS environment can recognise the launch files.

source devel/setup.sh

Now run terminal this will launch your world in gazebo

roslaunch mr_robot_gazebo turtlebot3_house.launch 

Depth_sensor setup

Point_Cloud

To As always, start with an update and upgrade.

sudo apt-get update
sudo apt-get upgrade

Install the dependencies

sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev
sudo apt install ros-noetic-rgbd-launch

Get the libfreenect repository from GitHub

git clone git://github.com/OpenKinect/libfreenect.git

Make and install

cd libfreenect
mkdir build
cd build
cmake -L ..
make
sudo make install
sudo ldconfig /usr/local/lib64/

To use kinect without sudoing every time

sudo adduser $USER video
sudo adduser $USER plugdev

Next we will add some device rules

sudo nano /etc/udev/rules.d/51-kinect.rules

Paste the following and ctrl+q to save.

# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02b0", MODE="0666"
# ATTR{product}=="Xbox NUI Audio"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ad", MODE="0666"
# ATTR{product}=="Xbox NUI Camera"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ae", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c2", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02be", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02bf", MODE="0666"

Now Create your catkin workspace directory, skip this step if you already have it setup.

mkdir -r ~/catkin_ws/src

Now we will download the required ROS package.

cd ~/catkin_ws/src
git clone https://github.com/ros-drivers/freenect_stack.git

Now we will use catkin make command to get the ROS on our system to recognise the examples.

cd ..
catkin_make

Source the setup file in newly created ‘devel’ directory so that our ROS environment can recognise the launch files.

source devel/setup.sh

Now run these comands to get depth image on rviz and change fixed frame from map to camera_link

 roslaunch mr_robot_gazebo turtlebot3_house.launch 
roslaunch freenect_launch freenect.launch depth_registration:=true

Octomapping

Install Octomap

sudo apt-get install ros-noetic-octomap ros-noetic-octomap-mapping ros-noetic-octomap-msgs ros-noetic-octomap-ros ros-noetic-octomap-rviz-plugins ros-noetic-octomap-server

Now go to directory octomap_mapping/octomap_server/launch and open octomapping.launch and change following

in line 14 odom_combined --> odom in line 20 /narrow_stereo/points_filtered2 --> /kinect/depth/points

Run

roslaunch octomap_server octomap_mapping.launch

Now on Rviz add MarkerArray and change topic to /occupied_cells_vis_array

Creating map

Now navigate bot in gazebo using teleop twist keyboard

rosrun teleop_twist_keyboard teleop_twist_keyboard.py 

this will create your map

Saving the new map

Now that we have created a new map, we need to save it to be able to use it in future. Open a new terminal in the maps directory inside the mr_robot_nav package and execute the following command there :

rosrun map_server map_saver -f custom_map

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages