Skip to content

SuperGops7/turtle_navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turtle Navigator - ROS2 Autonomous Navigation

Python Ubuntu ROS

Overview

This ROS2 package demonstrates autonomous navigation using Turtlesim. The turtle navigates to random waypoints and avoids obstacles represented by additional turtles in the environment.

Features

  • Autonomous waypoint navigation
  • Dynamic speed control using ROS2 parameters
  • Obstacle avoidance with real-time feedback
  • Modular design with separate navigation and obstacle management

Demo

Turtle Navigator Demo

Installation

  1. Clone this repository into your ROS2 workspace:

    cd ~/ros2_ws/src
    git clone https://github.com/SuperGops7/turtle_navigator.git
  2. Build the package:

    cd ~/ros2_ws
    colcon build
  3. Source the workspace:

    source install/setup.bash

Running the Simulation

  1. Start the Turtlesim node:

    ros2 run turtlesim turtlesim_node
  2. Run the move_turtle node:

    ros2 run turtle_navigator move_turtle

Customization

  • Adjust turtle speed:

    ros2 param set /move_turtle linear_speed 1.0
    ros2 param set /move_turtle angular_speed 2.0
  • Add obstacles in turtle_obstacle_manager.py by defining additional turtles:

    self.obstacles = [
        {'name': 'turtle2', 'position': [1.0, 7.0]},
        {'name': 'turtle3', 'position': [7.0, 2.0]}
    ]

Class Overview

  • MoveTurtle: Manages turtle navigation and obstacle avoidance.
  • TurtleObstacleManager: Handles spawning and tracking of obstacle turtles.

Future Improvements

  • Add dynamic obstacles or implement path planning for smarter navigation.

About

A Simple (for now) Turtle Navigator on ROS2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages