Coder Social home page Coder Social logo

ptientho / checkpoint3-citylab_project Goto Github PK

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

Control Turtlebot3 to move along a racetrack while performing wall avoidance

CMake 29.02% C 4.83% C++ 10.85% Makefile 35.64% Python 9.11% Shell 9.15% PowerShell 1.39%

checkpoint3-citylab_project's Introduction

Citylab_project

Introduction

This project aims to exploit ROS2 architecture including topic, service, and action to control Turtlebot3 traversing a racetrack

Control Turtlebot3 in simulation via ROS topic

The robot subscribes to the scanner topic and publishes the velocity topic. With these two topics, the robot is able to avoid the obstacles.
To launch the code, run the following command

ros2 launch robot_patrol start_patrolling.launch.py

checkpoint3

Control Turtlebot3 in simulation via ROS service

In this section, a service server is to make decisions based on the scanner data whether to direct the robot to move forward, left, or right. A service client receives any of those commands from the server and publishes the velocity topic to move the robot.
To launch the code, run the following command. This command will launch two nodes- a service server and a service client.

ros2 launch robot_patrol main.launch.py

checkpoint3_1

Control Turtlebot3 in simulation via ROS action

In this section, an action server is created to direct the robot to a goal position received via the terminal. The server will do three things.

  1. receive a goal position
  2. publish feedbacks
  3. send a result to a client

To launch the action server, run the following command

ros2 launch robot_patrol start_gotopoint_action.launch.py

To send a goal to the server, type the following command in the terminal. For example, send a goal x=0.7, y=0.3, theta=0.0

ros2 action send_goal -f /go_to_point robot_patrol_interface/action/GoToPoint "{goal_pos: {x: 0.7, y: 0.3, z: 0.0}}"

checkpoint3_2

checkpoint3-citylab_project's People

Contributors

ptientho avatar

Stargazers

 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.