CrazyS icon indicating copy to clipboard operation
CrazyS copied to clipboard

[NOT_MERGE_YET] Add Lee's geometric controller

Open gsilano opened this issue 2 years ago • 6 comments

This pull request aims to integrate Lee's geometric controller implemented by Stefano Grossi into the CrazyS repository (i.e., Crazyflie 2.x simulator). It also tries to answer to the need for more control algorithms in the repo.

Linked issues: #43, #74, #75, #76, #77, #4, #71, #69, #68, #65, #50, #47, #45, #42, #36, #1, #15.

Stefano also made available a MATLAB script for running Lee's controller in MATLAB with Gazebo in the loop: https://github.com/gsilano/CrazyS/wiki/Interfacing-CrazyS-through-MATLAB

The code still needs some improvements to remove hard-coded parameters in the files.

Contributors: Stefano Grossi, Lorenzo Sabattini, Federico Pratissoli, and Beatrice Capelli. Giuseppe Silano helped with the integration in the CrazyS repository.

gsilano avatar Nov 09 '21 14:11 gsilano

Work has been done to remove hard-coded parameters in the controller. Also, Forster's parameters (see #56) are now an option for launch files. Although everything appears to be correct, the code still does not allow the drone to take off. This may require fine-tuning of the parameters (see crazyflie2_lee_controller_alpha.yaml file) or there may be typos in the code. Hope someone in the CrazyS community can help me with this.

gsilano avatar Nov 14 '21 11:11 gsilano

Add also a c++ script for publishing waypoints, as requested in #17.

gsilano avatar Apr 16 '22 11:04 gsilano

hi, when I run this node, it gives me the following error. lee_position_controller_alpha_node: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:365: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::Index, Eigen::Index) [with Derived = Eigen::Matrix<double, 3, 3>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = double; Eigen::Index = long int]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.

wawachen avatar May 06 '22 13:05 wawachen

Hi! As you can read from the title, the pull request is still in progress. As soon as the code integration is finished, I will join the master.

gsilano avatar May 06 '22 13:05 gsilano

Edit: I was able to build the #86. I used ubuntu 18.04 with ros-melodic and followed steps of melodic and gazebo 9


Hi! i wanted to contribute to this issue. I was able to execute examples using master branch. I am unable to successfully execute catkin build on #86. Can you please advise for same?

System

I am using ubuntu 20.04 with ros-noetic

Steps I followed

  1. I tried following README.md present in master branch as there was no README present in #86. I believe I may have to follow other instructions as they may not be valid for my configuration.

  2. I was able to follow till part 2 of installation steps. (except cloning #86 branch in catkin_ws)

  • in part 3, I faced issue while running:

rosdep install --from-paths src -i image

  1. I am encountering issue while running catkin build . Initially, I got compilation issues related to opencv header files as mentioned below Screenshot from 2022-10-18 23-58-02 which I resolved by following open-cv-git-issue and https://stackoverflow.com/a/72386873/. The changed files can be found at my fork for this PR: https://github.com/gsilano/CrazyS/compare/pull/lee_controller...pacificlion:CrazyS:pull/lee_controller

  2. After this, i was able to get pass compilation issues for rotors_gazebo_plugins:make, now getting issues for rotors_gazebo:make . Following is error screenshot Untitled

Stack Overflow
First the code:

#include <stdio.h> #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp>

using namespace cv;

int main( int argc, char** argv ) { Mat image;

pacificlion avatar Oct 19 '22 07:10 pacificlion

Hi! Take a look at #40. This might solve your issue.

gsilano avatar Oct 23 '22 18:10 gsilano