Skip to content

Commit c3b941c

Browse files
Merge pull request #98 from loco-3d/release/v2.0.0
Release/v2.0.0
2 parents c6b0c43 + d8df12e commit c3b941c

File tree

6 files changed

+155
-183
lines changed

6 files changed

+155
-183
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*deprecated/*
2+
*build*

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
Releases are available on the [github repository](https://github.com/loco-3d/linear-feedback-controller/releases).
9+
10+
## [Unreleased]
11+
12+
## [2.0.0] - 2025-04-14
13+
14+
### Changed
15+
16+
- Breaking change: migration ROS2
17+
- Splitting the ROS vs none ROS part of the code.
18+
19+
### Added
20+
21+
- Added unit-test for the math.
22+
23+
## [1.0.2] - 2023-04-03
24+
25+
### Added
26+
27+
- pal_statistics introspection.
28+
- computation of the ZMP in the controller for debugging
29+
- computation of the position of the pendulum base fro debugging.
30+
- computation of the CoM acceleration from the measured forces.
31+
32+
## [1.0.1] - 2023-03-21
33+
34+
### Fixed
35+
36+
- Fix the averaging filter implementation.
37+
38+
### Changed
39+
40+
- Update the usage of the Eigen API to save some code lines.
41+
42+
## [1.0.0] - 2023-03-17
43+
44+
### Changed
45+
46+
Remove the msgs package and mv the lfc at the root of the git repository.
47+
msgs are now here: https://github.com/loco-3d/linear-feedback-controller-msgs
48+
49+
## [0.1.0] - 2023-03-17
50+
51+
Implementation of linear-feedback-controller in ROS1 for Talos PAL-Robotics robot.
52+
53+
## Git changelogs
54+
55+
[Unreleased]: https://github.com/loco-3d/linear-feedback-controller/compare/v2.0.0...HEAD
56+
[2.0.0]: https://github.com/loco-3d/linear-feedback-controller/compare/v1.0.2...v2.0.0
57+
[1.0.2]: https://github.com/loco-3d/linear-feedback-controller/compare/v1.0.1...v1.0.2
58+
[1.0.1]: https://github.com/loco-3d/linear-feedback-controller/compare/v1.0.0...v1.0.1
59+
[1.0.0]: https://github.com/loco-3d/linear-feedback-controller/compare/v0.1.0...v1.0.0
60+
[0.1.0]: https://github.com/loco-3d/linear-feedback-controller/releases/tag/v0.1.0

README.md

Lines changed: 45 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
This repository is aimed to be used with its public API the
66
[linear_feedback_controller_msgs](https://github.com/loco-3d/linear-feedback-controller-msgs).
77

8-
These two package are under the license [BSD-2 license](./LICENSE).
8+
These two packages are under the license [BSD-2 license](./LICENSE).
99

10-
The current versions of this 2 package can be found in their respective `package.xml` file.
10+
The current versions of these two packages can be found in their respective
11+
`package.xml` file. There **must** be an associated git tag in a shape of vX.Y.Z.
1112

1213
Follows a quick description of these package.
1314

@@ -18,137 +19,84 @@ controller.
1819
It is implementing a chainable controller pluggable with any kind of state
1920
estimator.
2021

21-
We implement a ROS 2 action client/server setup.
22-
We send a request with:
22+
We implement a ROS 2 topic publisher sending:
2323
- base configuration (only if the robot has a free-flyer, identity otherwise)
2424
- base velocity (only if the robot has a free-flyer, identity otherwise)
2525
- joint positions
2626
- joint velocities
2727
- joint efforts (torques applied to the joints)
2828

29-
We send receive the response in the shape:
29+
We send receive the response via a topic in the shape:
3030
- A feedback gain matrix
3131
- A feedforward term in torque
32-
- The state which was used to linearize the control.
32+
- The state which was sent before used to linearize the control.
3333

3434
This allows us, for example, to use it on the Talos (1 and 3) robots with a remote controller
3535
using a whole body model predictive control based on [croccodyl](https://github.com/loco-3d/crocoddyl)
3636

3737
## The linear_feedback_controller_msgs
3838

3939
[This package](https://github.com/loco-3d/linear-feedback-controller-msgs) contains the external user interface to the linear_feedback_controller
40-
package. It describes the sensor data exchanged in the previously cited RosTopics.
40+
package. It describes the sensor data exchanged in the previously cited ROS2 topics.
4141

4242
And in particular it offers a very simple ROS/[Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page)
43-
conversion. This is made to facilitate further computations with the Sensor
44-
data. And ease to fill in the Control message.
43+
conversion tooling.
44+
And a ROS/[numpy](https://numpy.org/) conversion tooling.
45+
These are made to facilitate further computations with the Sensor data,
46+
and ease to fill in the Control message.
4547

4648
Please check the [README.md](https://github.com/loco-3d/linear-feedback-controller-msgs/blob/main/README.md) of the package for more details.
4749

4850
## Example of usage
4951

50-
### Requirements
52+
This a ROS2 controller so on can simply look at the ROS2 control documentation.
53+
An example of configuration can be found
54+
[in this repository here](./config/tiago_pro_lfc_params.yaml).
5155

52-
For this example you need to have access to the dockers in https://gitlab.laas.fr/gsaurel/docker-pal/.
53-
This is a private repository so one need to be part of the LAAS-CNRS french laboratory.
54-
Further development will provide a new public image in order to use this code in simulation.
56+
The example is extracted from the agimus-demos pacakges:
57+
https://github.com/agimus-project/agimus-demos
5558

56-
### Build the repository using ROS and docker.
59+
And in particular the setup of the LFC is in the `agimus_demos_common` package.
5760

58-
First of all build or pull the docker from https://gitlab.laas.fr/gsaurel/docker-pal/
59-
using the branch `gsaurel`.
61+
### Build the package.
6062

61-
```
62-
docker pull gitlab.laas.fr:4567/gsaurel/docker-pal:gsaurel
63-
```
64-
65-
Then run the docker and mount (`-v` docker option) the `src` and `build` folder
66-
of your workspace in order to get some cache between to run of the container:
67-
68-
```
69-
chown -R :gepetto $(YOUR_WS) # you might need sudo if you get errors here
70-
chmod -R g+rwX $(YOUR_WS) # you might need sudo if you get errors here
71-
xhost +local:
72-
docker run --rm -v $(YOUR_WS)/src:/ws/src -v $(PWD)/Makefile:/ws/Makefile -v /home/$(USER)/devel:/home/user/devel -v $(YOUR_WS)/build:/ws/build --gpus all --net host -e DISPLAY -it gitlab.laas.fr:4567/gsaurel/docker-pal:gsaurel
73-
```
63+
This package is base on ament_cmake hence one can simply use the standard:
7464

75-
If you need another terminal to connect to the last docker container ran you can use:
76-
```
77-
docker exec --workdir=/ws -u user -it `docker ps --latest --quiet` bash
65+
```bash
66+
git clone https://github.com/loco-3d/linear-feedback-controller.git
67+
cd linear-feedback-controller
68+
make _build
69+
cd _build
70+
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/your/install/folder
71+
make
72+
make install
7873
```
7974

80-
Once connected to docker with multiple terminal (5) please run in order:
75+
Or one can use the ROS2 super build system [colcon](https://colcon.readthedocs.io/en/released/):
8176

82-
- Terminal 1: Start the simulation:
83-
```
84-
reset && catkin build linear_feedback_controller && source install/setup.bash && roslaunch talos_pal_physics_simulator talos_pal_physics_simulator_with_actuators.launch robot:=full_v2
77+
```bash
78+
mkdir -p workspace/src
79+
git -C workspace/src clone https://github.com/loco-3d/linear-feedback-controller.git
80+
colcon build
8581
```
8682

87-
- Terminal 2: Spawn the default controller:
83+
One can also use [nix](https://nixos.org/) to:
84+
- Check the package (builds and run tests):
85+
```bash
86+
git clone https://github.com/loco-3d/linear-feedback-controller.git
87+
cd linear-feedback-controller
88+
nix flake check -L
8889
```
89-
reset && source install/setup.bash && roslaunch talos_controller_configuration default_controllers.launch
90-
```
91-
in the same terminal, once the robot is in the default pose, kill (`ctrl+C`) the roslaunch
92-
93-
- Terminal 3: Spawn the linear feedback controller:
94-
```
95-
reset && source install/setup.bash && roslaunch linear_feedback_controller talos_linear_feedback_controller.launch simulation:=true default_params:=true
96-
```
97-
98-
- Terminal 4: For recording logs you can use `rosbag`:
99-
```
100-
reset && source install/setup.bash && rosbag record -o src/lfc /linear_feedback_controller/sensor_state /linear_feedback_controller/desired_control
101-
```
102-
103-
- Terminal 5: For starting a very simple PD controller via Feedback gains run:
104-
```
105-
reset && source install/setup.bash && rosrun linear_feedback_controller pd_controller
106-
```
107-
108-
The next paragraph is the same procedure except one can use the Makefile that is
109-
in the root of this repos to do so.
110-
111-
### Build the repository using make
112-
113-
There is also [Makefile](Makefile) to ease the usage of docker and ROS instructions
114-
in order to execute the demo.
115-
116-
- Create the workspace and clone the repository
117-
```
118-
mkdir -p ~/devel/workspace/src
119-
cd ~/devel/workspace/src
120-
git clone --recursive git@github.com:loco-3d/linear-feedback-controller.git
121-
```
122-
123-
- Run the docker and build in terminal(1)
124-
```
125-
cd ~/devel/workspace/src/linear_feedback_controller
126-
make docker_pull_and_run
127-
make build
128-
```
129-
130-
- Run the simulation, terminal(1)
131-
```
132-
make simu
133-
```
134-
135-
- Run the default controller and kill it (ctrl+C) when the robot is in half-sitting terminal(2)
136-
```
137-
make docker_connect
138-
make default_ctrl
139-
```
140-
141-
- Run the linear feedback controller terminal (2)
142-
```
143-
make lf_ctrl
144-
```
145-
146-
- Run the PD controller using the lfc terminal (3)
90+
- Build the package:
91+
```bash
92+
nix build -L
14793
```
148-
make docker_connect
149-
make pd_ctrl
94+
- Create a shell in which the LFC can be built:
95+
```bash
96+
nix develop
15097
```
15198

99+
Alternatively, you can use [nix-direnv](https://github.com/nix-community/nix-direnv/) to automatically activate the development environment
152100
### Copyrights and License
153101

154102
See the BSD-2 LICENSE file.

config/talos_linear_feedback_controller_params.yaml

Lines changed: 0 additions & 85 deletions
This file was deleted.

config/tiago_pro_lfc_params.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
linear_feedback_controller:
3+
ros__parameters:
4+
type: linear_feedback_controller/LinearFeedbackController
5+
moving_joint_names: [
6+
arm_right_1_joint,
7+
arm_right_2_joint,
8+
arm_right_3_joint,
9+
arm_right_4_joint,
10+
arm_right_5_joint,
11+
arm_right_6_joint,
12+
arm_right_7_joint
13+
]
14+
arm_right_1_joint:
15+
p: 10000.0
16+
d: 0.6
17+
arm_right_2_joint:
18+
p: 30000.0
19+
d: 5.0
20+
arm_right_3_joint:
21+
p: 5000.0
22+
d: 1.0
23+
arm_right_4_joint:
24+
p: 500.0
25+
d: 5.0
26+
arm_right_5_joint:
27+
p: 500.0
28+
d: 0.0
29+
arm_right_6_joint:
30+
p: 500.0
31+
d: 0.3
32+
arm_right_7_joint:
33+
p: 500.0
34+
d: 0.0
35+
chainable_controller:
36+
command_interfaces:
37+
- arm_right_1_joint_inertia_shaping_controller/arm_right_1_joint/effort
38+
- arm_right_2_joint_inertia_shaping_controller/arm_right_2_joint/effort
39+
- arm_right_3_joint_inertia_shaping_controller/arm_right_3_joint/effort
40+
- arm_right_4_joint_inertia_shaping_controller/arm_right_4_joint/effort
41+
- arm_right_5_joint_inertia_shaping_controller/arm_right_5_joint/effort
42+
- arm_right_6_joint_inertia_shaping_controller/arm_right_6_joint/effort
43+
- arm_right_7_joint_inertia_shaping_controller/arm_right_7_joint/effort
44+
reference_prefix: ''
45+
joint_velocity_filter_coefficient: 0.9
46+
pd_to_lf_transition_duration: 0.1
47+
remove_gravity_compensation_effort: true
48+
robot_has_free_flyer: false

0 commit comments

Comments
 (0)