Skip to content

Commit b034c00

Browse files
committed
getting ready for PR
1 parent 0cfb7f2 commit b034c00

File tree

11 files changed

+56
-10
lines changed

11 files changed

+56
-10
lines changed

auv_control_demos/chained_controllers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ applies a PWM command to the hardware interface.
8888
following command:
8989

9090
```bash
91-
ros2 topic pub /integral_sliding_mode_controller/system_state geometry_msgs/msg/Twist
91+
ros2 topic pub /integral_sliding_mode_controller/system_state nav_msgs/msg/Odometry
9292
```
9393

9494
5. The ISMC accepts reference commands sent over a topic or a reference

auv_control_demos/individual_controller/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Example 1: Individual Controller
22

3-
This example uses the [integral sliding mode controller](https://github.com/Robotic-Decision-Making-Lab/auv_controllers/tree/main/velocity_controllers) to demonstrate how
4-
to launch a single controller.
3+
This example uses the [integral sliding mode controller](https://github.com/Robotic-Decision-Making-Lab/auv_controllers/tree/main/velocity_controllers) to demonstrate how to launch a single controller.
54

65
## Tutorial Steps
76

@@ -62,7 +61,7 @@ to launch a single controller.
6261
topic-based interface:
6362

6463
```bash
65-
ros2 topic pub /integral_sliding_mode_controller/system_state geometry_msgs/msg/Twist
64+
ros2 topic pub /integral_sliding_mode_controller/system_state nav_msgs/msg/Odometry
6665
```
6766

6867
5. The ISMC accepts reference commands sent via a topic or the controller's
@@ -80,7 +79,7 @@ to launch a single controller.
8079
ros2 topic echo /integral_sliding_mode_controller/status
8180
```
8281

83-
Should yield an output similar to the following:
82+
should yield an output similar to the following:
8483

8584
```bash
8685
header:

auv_control_msgs/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ find_package(std_msgs REQUIRED)
66
find_package(geometry_msgs REQUIRED)
77
find_package(builtin_interfaces REQUIRED)
88
find_package(rosidl_default_generators REQUIRED)
9+
find_package(trajectory_msgs REQUIRED)
910

1011
rosidl_generate_interfaces(auv_control_msgs
1112
"msg/MultiActuatorStateStamped.msg"
12-
DEPENDENCIES builtin_interfaces std_msgs geometry_msgs
13+
"msg/IKControllerStateStamped.msg"
14+
DEPENDENCIES builtin_interfaces std_msgs geometry_msgs trajectory_msgs
1315
)
1416

1517
ament_package()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
std_msgs/Header header
2+
3+
# The name of the IK solver used by the controller
4+
string solver_name
5+
6+
# Position DoF names, e.g., joint or axis names.
7+
string[] position_joint_names
8+
9+
# Velocity DoF names.
10+
string[] velocity_joint_names
11+
12+
# The reference end effector pose.
13+
geometry_msgs/Pose reference
14+
15+
# Time between two consecutive updates/execution of the control law.
16+
# This is often used for integration of the solution to determine the desired positions.
17+
float64 time_step
18+
19+
# The IK solver solution.
20+
trajectory_msgs/JointTrajectoryPoint solution

auv_control_msgs/package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<test_depend>ament_lint_common</test_depend>
2323

2424
<depend>std_msgs</depend>
25+
<depend>geometry_msgs</depend>
26+
<depend>trajectory_msgs</depend>
2527

2628
<exec_depend>rosidl_default_runtime</exec_depend>
2729
<member_of_group>rosidl_interface_packages</member_of_group>

velocity_controllers/src/adaptive_integral_terminal_sliding_mode_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ auto AdaptiveIntegralTerminalSlidingModeController::update_and_write_commands(
329329

330330
if (rt_controller_state_pub_ && rt_controller_state_pub_->trylock()) {
331331
rt_controller_state_pub_->msg_.header.stamp = time;
332-
for (const auto && [i, state] : std::views::enumerate(rt_controller_state_pub_->msg_.dof_states)) {
332+
for (auto && [i, state] : std::views::enumerate(rt_controller_state_pub_->msg_.dof_states)) {
333333
const auto out = command_interfaces_[i].get_optional();
334334
state.reference = reference_interfaces_[i];
335335
state.feedback = system_state_values_[i];

velocity_controllers/src/integral_sliding_mode_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ auto IntegralSlidingModeController::update_and_write_commands(
308308

309309
if (rt_controller_state_pub_ && rt_controller_state_pub_->trylock()) {
310310
rt_controller_state_pub_->msg_.header.stamp = time;
311-
for (const auto && [i, state] : std::views::enumerate(rt_controller_state_pub_->msg_.dof_states)) {
311+
for (auto && [i, state] : std::views::enumerate(rt_controller_state_pub_->msg_.dof_states)) {
312312
const auto out = command_interfaces_[i].get_optional();
313313
state.reference = reference_interfaces_[i];
314314
state.feedback = system_state_values_[i];

whole_body_controllers/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS
2424
message_transforms
2525
controller_common
2626
ik_solvers
27+
auv_control_msgs
2728
)
2829

2930
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})

whole_body_controllers/include/whole_body_controllers/ik_controller.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#pragma once
2222

23+
#include "auv_control_msgs/msg/ik_controller_state_stamped.hpp"
2324
#include "controller_interface/chainable_controller_interface.hpp"
2425
#include "controller_interface/controller_interface.hpp"
2526
#include "geometry_msgs/msg/pose.hpp"
@@ -94,6 +95,10 @@ class IKController : public controller_interface::ChainableControllerInterface
9495
std::unique_ptr<ik_controller::ParamListener> param_listener_;
9596
ik_controller::Params params_;
9697

98+
std::shared_ptr<rclcpp::Publisher<auv_control_msgs::msg::IKControllerStateStamped>> controller_state_pub_;
99+
std::unique_ptr<realtime_tools::RealtimePublisher<auv_control_msgs::msg::IKControllerStateStamped>>
100+
rt_controller_state_pub_;
101+
97102
// make the free-flyer position and velocity dof names "static"
98103
std::vector<std::string> free_flyer_pos_dofs_{"x", "y", "z", "qx", "qy", "qz", "qw"};
99104
std::vector<std::string> free_flyer_vel_dofs_{"x", "y", "z", "rx", "ry", "rz"};

whole_body_controllers/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<depend>message_transforms</depend>
3030
<depend>controller_common</depend>
3131
<depend>ik_solvers</depend>
32+
<depend>auv_control_msgs</depend>
3233

3334
<export>
3435
<build_type>ament_cmake</build_type>

0 commit comments

Comments
 (0)