Autonomous Navigation and Projectile Shooter System
SeDriCa-BatMobile is an autonomous robotics platform that combines perception, motion planning, and target shooting capabilities. The system is built on ROS2 and features both integrated control pipelines and simulation environments for testing and development.
This repository contains two main components:
- IntegratedPipeline: Contains the target detection, tracking, and cannon control system.
- Motion_Planning: Includes path planning, PID control for autonomous navigation, and Gazebo simulation environments.
This package integrates the core logic for the BatMobile's autonomous target acquisition and cannon control.
- Intelligent Target Scanning: Combined movement and rotation pattern for efficient target detection
- State Machine Architecture: Handles scanning, turning, approaching, and shooting phases
- Cannon Control: Precision aiming with adjustable angle and firing mechanism
coordinates_receiver
(Executable): Contains two logical nodes managed by an executor:coordinate_subscriber
: Subscribes to/get_point
for target coordinatestarget_publisher
: Publishes control commands to/Control_instruction
/get_point
(geometry_msgs/msg/Point
): Input topic for receiving target coordinates (x, y, z)/Control_instruction
(batmobile_integrated/msg/ControlInstructions
): Output topic publishing control commands
ControlInstructions.msg
:float32 linear_speed
: Desired forward/backward speedfloat32 angular_speed
: Desired turning speedbool shoot_cannon
: Flag to indicate whether to fire the cannonfloat32 cannon_angle
: Desired vertical angle for the cannon in radians
The Motion_Planning directory contains tools for path planning, navigation control, and simulation environments.
The gazebo_car_simulation
package provides a complete 3D simulation environment for testing the BatMobile's navigation capabilities.
Gazebo simulation environment with the BatMobile model
The system implements an PID controller for precise path following:
- PIDv1: Basic implementation using angle-based error calculation
- PIDv2: Improved with RViz and Matplotlib visualization
- PIDv3: Completely revamped to use cross-track error for better accuracy
- PIDv4: Implemented auto-tuning capabilities for path-specific optimization
- PIDv5/v6: Enhanced to support realistic vehicle kinematics with angular velocity
- PIDv7: Thetha and X changed to Angular vel and Linear vel.
- Automatic Parameter Tuning: Self-optimizes PID parameters based on path characteristics (till PIDv4)
- Cross-Track Error Minimization: Maintains precise path adherence
- Visualization Tools: Real-time performance monitoring with RViz and Matplotlib(for Rviz package and PIDv6. v7 not supported yet.)
Visualization of the BatMobile following a path with PID control
PID parameter auto-tuning process
The rviz_path_simulation
package provides visualization for testing path planning.
- Path Visualization: Display planned paths and robot trajectory
RViz visualization of path following with cross-track error highlighted
The occupancy_matrix
package provides tools for environmental mapping and path planning.
- Map Generation: Create arbitrary occupancy grids for testing
- Target Identification: Automatic detection of targets within the map
- Path Planning: Generate optimal paths to approach targets
Occupancy grid with path planning. Magenta dot is start position, green dot is target position
- ROS2 Humble: Follow the official installation guide
- Gazebo Fortress: For simulation environments
-
Clone the repository:
git clone https://github.com/Soni-Shivam/SeDriCa-BatMobile.git cd SeDriCa-BatMobile
-
Build the IntegratedPipeline:
cd IntegratedPipeline colcon build
-
Build the Motion Planning components:
cd ../Motion_Planning colcon build
# Source the setup file
cd IntegratedPipeline
source install/setup.bash
# Launch the main system
ros2 launch batmobile_integrated batmobile.launch.py
# Source the setup file
cd Motion_Planning
source install/setup.bash
# Launch the Gazebo simulation
ros2 launch gazebo_car_simulation sim.launch.py
Contributions to the SeDriCa-BatMobile project are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Thanks to all contributors who have helped develop the SeDriCa-BatMobile project.