Skip to content

GreedlyCore/depth_template

Repository files navigation

Building an environment map using the realsence d435 camera

ITMO practice, second year robotics

ROS_DISTRO: Noetic

This repo is a workspace with all needed packages, other dependencies you can instal via classic commands:

sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y

You can run naive cartographer with:

roslaunch depth_gazebo diff_naive.launch

Also you can compare it with gmapping 'cartographer' with:

roslaunch depth_gazebo diff_gmapping.launch

Also you can compare it with google cartographer with:

roslaunch depth_gazebo diff_google.launch

You can do the same things but with omnidirectional wheeled platform, commands will be almost the same (still unstable):

roslaunch depth_gazebo omni_naive.launch
roslaunch depth_gazebo omni_gmapping.launch
roslaunch depth_gazebo omni_google.launch

Manual installation of packages & dependencies

  • Run it from your catkin workspace folder
sh src/depth_gazebo/install_dependencies.sh

it provides you with

  • orb_slam2_ros that gives odom->base_link transform
  • depthimage_to_laserscan that turn poincloud without ground plane into laser scan msg format
  • realsense2_description+realsense_gazebo_plugin - obviously, for simulating d435, but i fitted real params, because in that repo was wrong FOV's and distances
  • pcl_ros - to work with pointcloud - filter it, rotating, some basic operations
  • amcl - estimate robot's localization (/amcl_pose)

You can test grid mapping in gazebo using depth_gazebo package. It provides you with omni wheel robot with depth camera on it, you can ride it throught teleop package:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Useful commands

  • don't forget to build && source it
catkin build && source ./devel/setup.bash
  • check if some topic is posting
rostopic hz /TOPIC_NAME
  • special flags for debugging big messages via rostopic echo: --noarr , --nostr
  • You can save map via cmd:
rosrun map_server map_saver --occ 90 --free 10 -f FILE_MAP_NAME map:=/map
  • See TF tree
rosrun rqt_tf_tree rqt_tf_tree

Acknowledgement

That's not 100% my code, i took some "references" from github repositories and im grateful to them:

But i don't recommend to took any parts of code from any of them - write yuor own code, becuase all mistakes and misunderstood will raise from stealing without understanding.

About

cartographer algorithm using prob robotics book

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published