Skip to content

ROS2 control linear feedback controller. It connects Ricatti gains based controllers with the hardware through ROS2 topics.

License

Notifications You must be signed in to change notification settings

loco-3d/linear-feedback-controller

Repository files navigation

pre-commit.ci status

linear feedback controller

This repository is aimed to be used with its public API the linear_feedback_controller_msgs.

These two packages are under the license BSD-2 license.

The current versions of these two packages can be found in their respective package.xml file. There must be an associated git tag in a shape of vX.Y.Z.

Follows a quick description of these package.

The linear_feedback_controller

In this package we implement a ros2_control controller. It is implementing a chainable controller pluggable with any kind of state estimator.

We implement a ROS 2 topic publisher sending:

  • base configuration (only if the robot has a free-flyer, identity otherwise)
  • base velocity (only if the robot has a free-flyer, identity otherwise)
  • joint positions
  • joint velocities
  • joint efforts (torques applied to the joints)

We send receive the response via a topic in the shape:

  • A feedback gain matrix
  • A feedforward term in torque
  • The state which was sent before used to linearize the control.

This allows us, for example, to use it on the Talos (1 and 3) robots with a remote controller using a whole body model predictive control based on croccodyl

For the interfacing of a fixed robot we add a joint_state_estimator which aims at providing a layer of filtering from the joint sensors.

In addition we provide a passthrough controller which aims at renaming some output interfaces downstream in case this is needed. Typically you may want the same configuration file for simulation and for the robot but the interfaces ffrom one to the other may not match. You can use the passthrough controller for this.

The linear_feedback_controller_msgs

This package contains the external user interface to the linear_feedback_controller package. It describes the sensor data exchanged in the previously cited ROS2 topics.

And in particular it offers a very simple ROS/Eigen conversion tooling. And a ROS/numpy conversion tooling. These are made to facilitate further computations with the Sensor data, and ease to fill in the Control message.

Please check the README.md of the package for more details.

Example of usage

This a ROS2 controller so on can simply look at the ROS2 control documentation. An example of configuration can be found in this repository here.

The example is extracted from the agimus-demos pacakges: https://github.com/agimus-project/agimus-demos

And in particular the setup of the LFC is in the agimus_demos_common package.

Build the package.

This package is base on ament_cmake hence one can simply use the standard:

git clone https://github.com/loco-3d/linear-feedback-controller.git
cd linear-feedback-controller
make _build
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/your/install/folder
make
make install

Or one can use the ROS2 super build system colcon:

mkdir -p workspace/src
git -C workspace/src clone https://github.com/loco-3d/linear-feedback-controller.git
colcon build

One can also use nix to:

  • Check the package (builds and run tests):
git clone https://github.com/loco-3d/linear-feedback-controller.git
cd linear-feedback-controller
nix flake check -L
  • Build the package:
nix build -L
  • Create a shell in which the LFC can be built:
nix develop

Alternatively, you can use nix-direnv to automatically activate the development environment

Copyrights and License

See the BSD-2 LICENSE file. For the main authors see the github repository for the main recent contributors.

Here is the list of the historical main authors:

  • Côme Perrot
  • Maximilien Naveau

Main maintainers

About

ROS2 control linear feedback controller. It connects Ricatti gains based controllers with the hardware through ROS2 topics.

Resources

License

Stars

Watchers

Forks

Packages

No packages published