elikos / elikos_ros

This repo was deprecated at the end of 2017. Packages were split into separate git repos. See elikos/elikos_quad
MIT License
6 stars 2 forks source link

Add PID controllers #10

Closed andre-nguyen closed 9 years ago

andre-nguyen commented 9 years ago

To simulate quadrotor displacement.

Possibly have two cascaded controllers to simulate velocity and position.

andre-nguyen commented 9 years ago

:3 Finished adding library for you @t0ni0. You can use it by writing e.g.:

// How to use the PID  
Pid<double> pid(1.0, 1.0, 1.0, Pid::PID_DIRECT, Pid::VELOCITY_PID, 1.0, 0.0, 100.0, 0.0);  
double output, input = 1.0;  
pid.Run(input);  
output = pid.output;  

You should check pid.hpp to see the initialization parameters. Not sure we this controller should be cumulative or not. Lib was taken from https://github.com/mbedded-ninja/MPid

This issue is addressed by 03381eaecb33c4994b21d97dc27125fcc51ad56c and 69d360b6d5ae16745f89415fab96d44f9c006de9.

t0ni0 commented 9 years ago

Cool thanks 8) will def try it out soon!