This repository provides a simple for obstacle avoidance
-
include
-- walker.hpp -
src
-- walker.cpp
-- walker_node.cpp
walker_node.cpp is where the object for the classes Walker is created.
- sudo apt-get install ros-melodic-urdf
- sudo apt-get install ros-melodic-interactive-markers
- sudo apt-get install ros-melodic-actionlib 4
-
Create a catkin workspace catkin_ws
-
Clone the turlebot3 package inside catkin_ws/src using
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
Refer link.
- Clone the turtlebot3_walker package
git clone https://github.com/sakshikakde/turtlebot3_walker.git
- Change the directory
cd catkin_ws
- run
catkin build
- Change the directory
cd catkin_ws
- Source the workspace
source devel/setup.bash
- In a terminal, run
roscore
- In a new terminal, run the talker by using
roslaunch turtlebot3_walker turtlebot3_obstacle_avoidance.launch
- platform_name : default="turtlebot3"
- publisher_topic_name : default="/cmd_vel"
- subscriber_topic_name : default="/scan"
- publisher_rate : default = 20
- scan_range : default="10"
- distance_threshold : default="1"
- bags_directory : default="/home"
- record_bag : default="false"
- launch_gazebo : default="true"
Set the record_bag param true in the launch file. Set the bags_directory as well.
-
Change the directory to the location where rosbag is recorded
-
Run the command
rosbag play <bagfile_name> --pause
- Launch the file turtlebot3_obstacle_avoidance.launch with gazebo off
roslaunch turtlebot3_walker turtlebot3_obstacle_avoidance.launch launch_gazebo:=false
https://drive.google.com/file/d/1rZaai8yFOqWnMEujxXBu6TGUDE9_OtfZ/view?usp=sharing