Skip to content

hansenmaster/send_move_base_goals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turtlebot_move_base_navigation_patrol_random

Sending random points continuously for Turtlebot3 move_base/goals on predefined area

Requirements:

$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* \
  ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers
$sudo apt install ros-noetic-dynamixel-sdk
$sudo apt install ros-noetic-turtlebot3-msgs
$sudo apt install ros-noetic-turtlebot3

Setup

$cd ~/catkin_ws/src
$git clone https://github.com/hansenmaster/send_move_base_goals.git
$cd ..
$catkin_make
$source devel/setup.bash

Move base package:

Move base is a navigation stack package on ROS that receive predefined map by SLAM, robot information (transform, odometry, sensor reading), and goals to output /cmd_vel topics and costmap. On real robot, the cmd_vel will be converted by its controller using the SDK.

Subscribe to:

  • /map (occupancy grid by SLAM)
  • /tf /odom /scan (robot information and sensors reading)
  • /move_base_simple/goals (goals for navigation)

Disclaimer

  • The contribution of this repository is to continously sends /move_base_simple/goals by sending action. The SLAM map and all navigation stack are available from the Turtlebot3 repository.
  • A bash script of auto pose initialization is also on the initial_pose.sh
  • The package is based on https://github.com/FiorellaSibona/turtlebot3_nav/tree/devel/catkin_ws/src/simple_navigation_goals . Instead of doing patrol on predefined points, I made random points to showcase that move_base really works autonomously while doing obstacle avoidance.

Goals generation

image The code will pick random area 1-4, then pick random coordinate inside the area. The goals generation is repeated forever for each time action is finished means the current target is reached.

image

How to run

Run Gazebo world simulation

$export TURTLEBOT3_MODEL=burger
$roslaunch turtlebot3_gazebo turtlebot3_world.launch

Run Navigation (change dir to map.yaml location)

$export TURTLEBOT3_MODEL=burger
$roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml 

Run pose initialization:

%sh initial_pose.sh 

This code is simply pub topic once at the spawn position of Gazebo world simulation. Then do rotation for 3 seconds to reduce the particle variance.

image

Run send_move_base_goals launchfile:

$roscd send_move_base_goals/scripts/
$chmod +x move_base_forever
$roslaunch send_move_base_goals movebase_continuous.launch
video.mp4

Reference

https://github.com/FiorellaSibona/turtlebot3_nav/tree/devel/catkin_ws/src/simple_navigation_goals

About

Sending random points continuously for Turtlebot3 move_base/goals on predefined area

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors