Giter Site home page Giter Site logo

erha527 / trajectory_server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swgmone/trajectory_server

0.0 0.0 0.0 1.8 MB

ROS implementation of a trajectory planner able to generate optimal polynomial trajectories starting from a variable number of waypoints specified in a \([x, y]\) space

C++ 97.76% CMake 2.24%

trajectory_server's Introduction

Trajectory Server

An Optimization-based Trajectory Planner

The trajectory_server module is an optimization-based trajectory planner able to process an unlimited number of waypoints, each of which specified as:

  1. wi the plane position of the waypoint,
  2. Ci a vector of constraints.

The implemented optimization procedure allows to generate optimal polynomial trajectories by weighting the overall travel time and the trajectory smoothness. The flexibility of our implementation allows to specify a variable number of derivative constraints for each waypoints letting the remaining quantities, needed to completely define the polynomial curve, to be free. These degrees of freedom are used by the trajectory optimization procedure to minimize a fixed trajectory cost.

Authors

Reference

If you make use of this code, please cite:

  • L. Gentilini, S. Rossi, D. Mengoli, A. Eusebi, L. Marconi. Trajectory Planning ROS Service for an Autonomous Agricultural Robot. IEEE MetroAgriFor 2021.

Trajectory Generation Example

In order to run this example, please runs the following commands:

  1. Set-up your ROS environment
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
  1. Clone the trajectory_server repository and build the project
git clone [email protected]:swgmone/trajectory_server.git
cd ~/catkin_ws
catkin_make
  1. Launch the trajectory_server module
roslaunch trajectory_server trajectory_server_node
  1. Run the client
rosrun trajectory_server trajectory_test_node

The provided example generate an optimal polynomial trajectory passing through nine waypoints:

x1 = -11.0,  y1 =  10.0
x2 = -4.0,   y2 =  10.0
x3 = -4.0,   y3 = -10.0
x4 =  3.0,   y4 = -10.0
x5 =  3.0,   y5 =  10.0
x6 =  10.0,  y6 =  10.0
x7 =  10.0,  y7 = -10.0
x8 =  17.0,  y8 = -10.0
x9 =  17.0,  y9 =  10.0

The trajectory_test_node.cpp file provides an example of the full interface to our planner. If you would like to change these waypoints, please check the trajectory_test_node.cpp file.

The provided example generate an optimal polynomial trajectory on the basis of the following parameters:

  1. Polynomial order = 7,
  2. Derivative to optimize = 3,
  3. Maximum velocity = 0.6,
  4. Maximum acceleration = 0.8,
  5. Time cost gain = 0.01,
  6. Effort cost gain = 1.0,
  7. Soft Constraint Gain = 0.1,
  8. Soft Constraint Epsilon = 1.0.

If you would like to test the trajectory optimization procedure with different parameters please check the trajectory_server.launch file.

trajectory_server's People

Contributors

lorenzogentilini avatar swgmone 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.