-
Notifications
You must be signed in to change notification settings - Fork 25
feat: converted velocity controller lqr to lifecycle node #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 11 commits
c3e54ca
0ea41ab
3241741
8d16883
c7c72d5
90d7488
0fc0b83
3f54490
d447265
f468c42
bd32498
5cedb95
0859536
a5b2185
efce34f
7e47a5b
782f78e
d93fe58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| ## Overview: | ||
| --- | ||
| Contains the LQR controller package for the AUV Orca. The controller utilizes an LQR optimal controller (imported from the python control library), and controls pitch, yaw and surge. The controller is meant to traverse larger distances. | ||
|
|
||
| #### Tuning of Parameters: | ||
| To tune parameters look at the config/param_velocity_controller_lqr.yaml file: | ||
|
|
||
|
|
||
| #### Launching the package: | ||
| ```bash | ||
| 1. inside ros2ws/colcon build --packages-select velocity_controller_lqr | ||
| ``` | ||
|
|
||
| ```bash | ||
| 2. Inisde ros2ws/: source install/setup.bash | ||
| ``` | ||
|
|
||
| ```bash | ||
| 3. ros2 launch velocity_controller_lqr velocity_controller_lqr.launch.py | ||
| ``` | ||
Q3rkses marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #### Transitioning between states manually: | ||
| The ROS2 node is implemented using lifecycle nodes, which are managed externally by a lifecycle manager i.e a finite state machine. If you want to manually test the node do the following: | ||
|
|
||
| **From Unconfigured ---> Inactive** | ||
| ```bash | ||
| ros2 lifecycle set /velocity_controller_lqr_node configure | ||
| ``` | ||
|
|
||
| **From Configured ---> Active** | ||
| ```bash | ||
| ros2 lifecycle set /velocity_controller_lqr_node activate | ||
| ``` | ||
|
|
||
| **From Active ---> Inactive** | ||
| ```bash | ||
| ros2 lifecycle set /velocity_controller_lqr_node deactivate | ||
| ``` | ||
|
|
||
| For the full state diagram you can refer to the figure below, sourced from the official ROS2 Documentation: | ||
|  | ||
|
|
||
|
|
||
| ### Theory | ||
| --- | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,14 @@ | ||
| /**: | ||
| ros__parameters: | ||
| dt: 0.1 | ||
|
|
||
| topics: | ||
| odom_topic: /orca/odom | ||
| twist_topic: /dvl/twist | ||
| pose_topic: /dvl/pose | ||
| guidance_topic: /guidance/los | ||
| thrust_topic: /thrust/wrench_input | ||
| softwareoperation_topic: /softwareOperationMode | ||
| killswitch_topic: /softwareKillSwitch | ||
|
||
|
|
||
| LQR_params: | ||
| q_surge: 75 | ||
|
|
@@ -17,6 +25,8 @@ | |
|
|
||
| i_weight: 0.5 | ||
|
|
||
| dt: 0.1 | ||
|
|
||
| inertia_matrix: [30.0, 0.6, 0.0, 0.6, 1.629, 0.0, 0.0, 0.0, 1.729] | ||
|
|
||
| #Clamp parameter | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.