Skip to content

Control Turtlebot3 to move along a racetrack while performing wall avoidance

Notifications You must be signed in to change notification settings

ptientho/checkpoint3-Citylab_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Control Turtlebot3 to move along a racetrack while performing wall avoidance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published