2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00
2023-01-21 11:33:15 +01:00

Tangent Planner Roller eye

Project structure

Subscribers and publishers

  1. odometry subscriber

    subscribing to odometry for getting Pose2D message(x, y, theta)

  2. tof subscriber

    subscribing to the scanner for getting range message (field of view, range, max range , min range)

  3. twist publisher

    calculating velocity based on odometry and tof message then publish twist message (linear x, linear y, angular z)

General workflow

The main function calls computeVelocityCommand of the node class, and it consists of 4 main steps:

  1. calculate errors

    error here means the x, y and theta difference between current position and goal

  2. update state

    there are states for robot :

    • StopAtGoal robot has reached to goal and there isn't any error
    • TurnToGoal robot needs to turn to goal when error_angel is more than a specific value and then start_patrolling to move
    • MotionToGoal robot can move toward goal with computed velocity
    • OrientToGoal robots x and y are ok but needs to change its orientation to goal
    • FollowBoundary robot is trying to skip an obstacle by following its boundary

    each time, based on changing situations, robot state will update to one of these states

  3. update controller

    based of robot current state that set at last step, some values will be set before computing velocity

  4. update velocity

    calculate the velocity for robot by using a nonlinear controller and values

Obstacle avoidance and follow boundary workflow

An obstacle avoidance planning algorithm that guides a robot from a start_patrolling to the goal point. The robot has two main behavior: MotionToGoal and FollowBoundary.

It starts moving to the goal until there is no obstacle. If it encounters an obstacle then starts to follow the obstacle’s boundary.

Following a boundary with a TOF sensor that has a low field of view is a challenging problem that has been solved by saving the history of the robot’s positions as well as the obstacle’s positions, in order to decide where to go at the next step. The robot exits the FollowBoundary mode when it passes the obstacle through the goal.

It finally stops at the goal point.

Controllers

  1. motion controller

    this controller is responsible for states which needs robot x and y to be changed
    b and c are the values for this controller to be adjusted and k1, k2 and k3 will be calculated

  2. turn controller

    this controller is responsible for states which robot just needs to turn around on its current place kp_ and kp_i_ are the values for this controller to be adjusted

Installation

generating debian package form source code

package generation form source code has been automated by docker, so it can be done by executing release.sh

$ sudo ./release.sh

note that the script uses docker to create debian package, and you must have docker installed on your system

installing debian package

you can install generated package by this command:

$ dpkg -i debian_package_name.deb

now the package should be in ros installation directory in the share subdirectory you can source ros setup.bash and run the package

S
Description
No description provided
Readme GPL-3.0
88 KiB
Languages
C++ 91.5%
Dockerfile 4.9%
CMake 3.3%
Shell 0.3%