git clone https://github.com/Ellakiya15/ROSbot.git
colcon build
source install/setup.bash
ros2 launch custom_bot gazebo.launch.py
This package includes a C++ node that listens to Twist messages from /cmd_vel, converts them into RPM values, and publishes them on the topics:
-
/left_wheel_rpm
-
/right_wheel_rpm
where wheelbase, wheel_radius and Maximum rpm are dynamically changeable. And also has custom plugin for Differential Drive called "DiffDrive".
ros2 run custom_bot cmd_vel_to_rpm
ros2 topic echo /left_wheel_rpm
ros2 topic echo /right_Wheel_rpm
For gazebo
gz topic -i /left_wheel_rpm
gz topic -i /right_wheel_rpm
A Python based waypoint navigation scripts which navigates by using PID Controller.
To fine-tune the control system, use rqt
for dynamic adjustment of PID Values:
Kp
(Proportional gain)Ki
(Integral gain)Kd
(Derivative gain)
ros2 run waypoint waypoint_navigation
ros2 run waypoint waypoint_navigation --ros-args -p waypoint_1_x:=2.0 -p waypoint_1_y:=1.0 -p waypoint_2_x:=4.0 -p waypoint_2_y:=3.0
[INFO] [1740153954.085911906] [waypoint_navigation]: Waypoint 1 reached: (2.0, 1.0)
[INFO] [1740153957.661830581] [waypoint_navigation]: Waypoint 2 reached: (4.0, 3.0)
[INFO] [1740153957.663092059] [waypoint_navigation]: Waypoints reached. Stopping robot.
[INFO] [1740153957.664060657] [waypoint_navigation]: Successfully reached all waypoints.