Git Product home page Git Product logo

vedhamshbode / ros2_project_turtle_follower Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.32 MB

This ROS 2 package includes a launch file and a node that allows you to control one turtle and have another turtle follow it based on its pose in the turtlesim environment.

CMake 28.44% Python 18.15% C++ 8.32% C 7.28% Makefile 20.34% TypeScript 0.11% Shell 14.25% PowerShell 3.11%
node ros2 topics turtlesim

ros2_project_turtle_follower's Introduction

ROS2 Turtle Follower Package

There are two ROS 2 packages in this repository. t_follower_pkg includes a launch file and a node that allows you to control one turtle and have another turtle follow it based on its pose in the turtlesim environment. While we will be able to control the first turtle.

The second package is turtkechaser. A main turtle (a.k.a. chaser) that will chase the other turtles, spawning only when the previous one is chased

These packages have been created and tested on Ubuntu 22.04 with ROS2 Humble.

Installation

  1. Clone this repository to your ROS 2 workspace:

    git clone https://github.com/your-username/your-ros2-turtle-package.git
  2. Build the package:

    rosdep install --from-paths src -y --ignore-src
    colcon build
  3. Source the setup file:

    source install/setup.bash

Usage of Turtle_follower

Launch the Turtle Follower

To launch the turtle follower along with the turtlesim node, use the provided launch file:

ros2 launch t_follower_pkg t_follower_launch.py

Solution

Creating a controller node that will control the linear and angular velocity of the chaser turtle as per the spawning of the other turtles. Creating a spawner node that will spawn turtles only when the previous one is chased. Using P controller to guide the chaser to the spawned turtle. Creating a launch file to launch all the required nodes in one go!

Usage of turtlechaser

# building the package
colcon build --packages-select turtlechaser

# source the workspace
source ~/turtlechaser_ws/install/setup.bash

# launch the nodes
ros2 launch turtlechaser turtlechaser.launch.py

Now you should be enjoying watching a turtle chasing other turtles on its own :D

ros2_project_turtle_follower's People

Contributors

vedhamshbode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.