Sending random points continuously for Turtlebot3 move_base/goals on predefined area
- ROS Noetic
- [Turtlebot3 PC Setup](https://emanual.robotis.com/docs/en/platform/turtlebot3/quick-start/#pc-setup)
$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$cd ~/catkin_ws/src
$git clone https://github.com/hansenmaster/send_move_base_goals.git
$cd ..
$catkin_make
$source devel/setup.bashMove 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)
- 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.
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.
$export TURTLEBOT3_MODEL=burger
$roslaunch turtlebot3_gazebo turtlebot3_world.launch$export TURTLEBOT3_MODEL=burger
$roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml %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.
$roscd send_move_base_goals/scripts/
$chmod +x move_base_forever$roslaunch send_move_base_goals movebase_continuous.launchvideo.mp4
https://github.com/FiorellaSibona/turtlebot3_nav/tree/devel/catkin_ws/src/simple_navigation_goals

