Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
a7e3777
Create PID Controller package.
destogl Sep 10, 2022
3667a20
Updated PID controller with functionality.
destogl Sep 15, 2022
eb6c296
Move parameter read and check into separate method for easier inherit…
destogl Sep 15, 2022
1b387c7
Small fixes of pid_controller for compilation.
destogl Sep 29, 2022
22f7094
Correct dependencies of PID controller.
destogl Nov 30, 2022
c076bda
Debug PID controller to actually work.
destogl Nov 30, 2022
3dea74c
Remove validation file since it is not needed.
destogl Dec 1, 2022
f451038
Delete LICENSE
destogl Feb 7, 2023
7c47ae0
Simplify things in the PID controller and add some error management.
destogl Dec 16, 2022
dacd8ea
Update CMake export in pid-controller
tylerjw Mar 18, 2023
a1eb1ac
Cleaning CMakeLists and deprecation from PID controller and starting …
destogl Mar 20, 2023
a423cc9
pid_controller compiles, tests need adjustments
muritane Mar 21, 2023
314adb7
all tests in test_pid_controller are green
muritane Mar 24, 2023
4e40be8
test_pid_controller_preceeding: all green
muritane Mar 27, 2023
edce147
Update pid_controller/include/pid_controller/pid_controller.hpp
destogl Mar 28, 2023
56e1a6e
Apply suggestions from code review
destogl Mar 28, 2023
703ee25
Apply suggestions from code review
destogl Apr 3, 2023
b11a67c
Rename test_pid_controller_preceeding.cpp to test_pid_controller_prec…
destogl Apr 3, 2023
d5bb3a6
Rename pid_controller_preceeding_params.yaml to pid_controller_preced…
destogl Apr 3, 2023
9145987
Update pid_controller/CMakeLists.txt
destogl Apr 3, 2023
d229ed8
Update pid_controller/test/test_pid_controller.cpp
destogl Apr 4, 2023
f1b6bca
More fixups for PID after renaming stuff in the message.
destogl Apr 4, 2023
0733d01
Apply suggestions from code review
destogl Apr 4, 2023
2fd0490
Add user doc
destogl Apr 4, 2023
00d03b7
Update controllers_index.rst
destogl Apr 4, 2023
072600e
Apply suggestions from code review
destogl Apr 5, 2023
a9868dc
Fixup formatting.
destogl Apr 5, 2023
5ddf108
Squashed commit of the following:
destogl Apr 3, 2023
b84b40a
Add reseting of individual DoFs to state values in JTC when using in …
destogl Apr 6, 2023
edc703b
Fix missing .cpp extension in CMakeLists for CTG
bijoua29 Apr 7, 2023
8b2761b
Fix unused variable compiler warning in pid_controller tests
bijoua29 Apr 7, 2023
81ca561
Added structures for joint limits.
destogl Jul 25, 2022
06d5f0b
Integrate SimpleJointLimiter in to JTC.
destogl May 4, 2023
8b97f22
Adjust default value of limiters.
destogl May 4, 2023
3ecaaa3
Fix missing .cpp extension in CMakeLists for CTG
bijoua29 Apr 7, 2023
7e4d851
Fix unused variable compiler warning in pid_controller tests
bijoua29 Apr 7, 2023
bcbb3fc
Added support for save integral term parameter
Whalex451 Apr 20, 2023
520a099
Applied suggestions from code review
Whalex451 Apr 20, 2023
8c6fff8
More comment updates
Whalex451 Apr 20, 2023
b41f5f7
Merge pull request #5 from SchillingRobotics/Add-support-for-new-para…
Whalex451 Apr 20, 2023
2ae8260
Check measured state for null to determine if hardware state available
bijoua29 May 8, 2023
cb851b4
Fix pre-commit warnings not related to changes in this branch
bijoua29 May 8, 2023
069ec65
Remove unused variable
bijoua29 May 8, 2023
1b4ee7b
Fix bug in processing read of state from hardware
bijoua29 May 8, 2023
61f6eee
Remove deprecated rclcpp/qos_event.hpp
bijoua29 May 12, 2023
eb1cd2b
Remove unused free functions for resetting controlled feedback messages
bijoua29 May 12, 2023
e495783
Use time from start passed in from input reference if non-zero in CTG
bijoua29 Aug 30, 2023
dfbd63e
Merge pull request #8 from SchillingRobotics/ctg-use-time-from-start
destogl Aug 30, 2023
2fb152c
Modify CTG to expect twist in measured state input to be in body frame
bijoua29 Sep 5, 2023
3cc05db
Update comment
bijoua29 Sep 6, 2023
486c078
Merge pull request #9 from SchillingRobotics/ctg-meas-state-twist-body
bijoua29 Sep 6, 2023
92e7139
Update PIDController to enable parameter updates.
destogl Sep 11, 2023
6b118f4
Handle NaNs in measured state in CTG
bijoua29 Sep 12, 2023
8ca56ef
Merge pull request #10 from SchillingRobotics/bijoua/handle_meas_stat…
bijoua29 Sep 12, 2023
06b35a1
Add cartesian state into CTG.
destogl Sep 20, 2023
71c128a
Fix stair step in JTC when new trajectory message received
bijoua29 Sep 25, 2023
4411276
Reset initial value of last commanded time to 0.
destogl Sep 26, 2023
0c83a41
Use previous state for limiters.
destogl Sep 28, 2023
68920c4
Use values, if present in reset dofs service, instead of fb to reset
bijoua29 Oct 18, 2023
986de2d
Merge pull request #11 from SchillingRobotics/bijoua/update_reset_dof…
bijoua29 Oct 18, 2023
377ebb9
Fix bug when two reset dofs req sent without being processed in between
bijoua29 Oct 20, 2023
0756f14
Update reset dofs output messages in JTC
bijoua29 Oct 20, 2023
8af535b
Merge pull request #12 from SchillingRobotics/bijoua/fix_reset_dofs_bug
bijoua29 Oct 20, 2023
bbaee37
Remove service for setting joint limits in CTG.
destogl Nov 1, 2023
b6b8ba7
Merge remote-tracking branch 'upstream/master' into merge_main
henrygerardmoore May 9, 2024
17515b1
wip JTC fix
Jun 26, 2024
56fc64b
Merge pull request #1 from SchillingRobotics/merge_main
henrygerardmoore Jul 26, 2024
39ee1e4
remove unnecessary includes
henrygerardmoore Aug 6, 2024
cb551ea
wip
henrygerardmoore Aug 7, 2024
d4371f5
add prototype interface for different message type for CTG to use
henrygerardmoore Aug 7, 2024
eaee233
remove duplicate dep
henrygerardmoore Aug 12, 2024
4492c14
add skeleton of MTJTC
Aug 13, 2024
60667fd
remove joint from name, reset CTG
henrygerardmoore Aug 19, 2024
d732440
flesh out skeleton of MTTC
henrygerardmoore Aug 19, 2024
64f948c
fix copyright years and attributions
henrygerardmoore Aug 19, 2024
9e0f16f
finish skeleton of implementation
henrygerardmoore Aug 19, 2024
f5bea12
fix bug
henrygerardmoore Aug 19, 2024
5980fbd
got it building
henrygerardmoore Aug 21, 2024
8cfd8c4
explicitly cast to long to avoid warning
henrygerardmoore Aug 22, 2024
ee82ccc
add pluginlib calls, return export target ament call
henrygerardmoore Aug 23, 2024
abb214a
wip adding tests
henrygerardmoore Aug 23, 2024
af03c08
vectorize compute error, finish one test
henrygerardmoore Aug 26, 2024
1cd6ed8
renaming, another test done
henrygerardmoore Aug 26, 2024
fef259b
finished another test
henrygerardmoore Aug 26, 2024
465caef
another test and rename
henrygerardmoore Aug 26, 2024
2900710
more tests
henrygerardmoore Aug 27, 2024
dbbc25d
size_t to std::size_t and another test
henrygerardmoore Aug 27, 2024
f9b7910
test_jumbled_joint_order
henrygerardmoore Aug 27, 2024
8e2aac5
test_partial_joint_list
henrygerardmoore Aug 27, 2024
f78a55e
test_partial_joint_list_not_allowed
henrygerardmoore Aug 27, 2024
ce4b93e
invalid_message
henrygerardmoore Aug 27, 2024
fc6bf59
expect_invalid_when_message_with_nonzero_end_velocity_and_when_param_…
henrygerardmoore Aug 27, 2024
69553f5
missing_position_message_accepted
henrygerardmoore Aug 27, 2024
b43f909
test_trajectory_replace
henrygerardmoore Aug 27, 2024
0d87e23
test_ignore_old_trajectory
henrygerardmoore Aug 27, 2024
d9c5779
test_execute_partial_traj_in_future
henrygerardmoore Aug 27, 2024
94feda3
remove debug var
henrygerardmoore Aug 27, 2024
273ac74
test_hw_states_has_offset_first_controller_start
henrygerardmoore Aug 27, 2024
5a89dc3
test_hw_states_has_offset_later_controller_start
henrygerardmoore Aug 27, 2024
e44b855
test_state_tolerances_fail and test_goal_tolerances_fail
henrygerardmoore Aug 27, 2024
5c96a52
fix build errors
henrygerardmoore Aug 27, 2024
b1cb5da
update copyright messages, lint
henrygerardmoore Aug 27, 2024
2e0c807
fix some seg faults
henrygerardmoore Aug 27, 2024
f7fedaf
revert JTC to upstream version, update MAC for master ros2_control
henrygerardmoore Aug 28, 2024
b3b1414
merge upstream controllers
henrygerardmoore Aug 28, 2024
057e550
fixed seg fault and use joint limiter
henrygerardmoore Aug 28, 2024
1e876df
add MAC to ros2_controllers for easy building
henrygerardmoore Aug 28, 2024
901f6b3
fix accidentally non-empty fields and add helper function
henrygerardmoore Aug 28, 2024
543d4be
const some vectors
henrygerardmoore Aug 28, 2024
01a9ee0
the great renaming
henrygerardmoore Aug 28, 2024
046ba67
fix several tests
henrygerardmoore Aug 29, 2024
a5a5bd4
add TODO
henrygerardmoore Aug 29, 2024
31f3c5b
bug fixes
henrygerardmoore Aug 30, 2024
bf637cc
fixes based on failing tests
henrygerardmoore Aug 31, 2024
624821c
add test load controller
henrygerardmoore Sep 1, 2024
37279c2
upgrade necessary parameter warning to error and return
henrygerardmoore Sep 1, 2024
14e7e0e
correct parameter comment
henrygerardmoore Sep 1, 2024
b4fd8db
fix names in test assets
henrygerardmoore Sep 3, 2024
eab3e39
add param to replicate JTC functionality
henrygerardmoore Sep 3, 2024
7d19e99
WIP debugging MAC startup
henrygerardmoore Sep 3, 2024
502fcd6
add parameter to use feedback and add skeleton of necessary logic to MAC
henrygerardmoore Sep 4, 2024
f9448ac
fix test utils, downgrade message to debug
henrygerardmoore Sep 4, 2024
ca6aacf
improve traj validation
henrygerardmoore Sep 4, 2024
4a39135
fix test
henrygerardmoore Sep 6, 2024
41bdb36
fix to align with JTC functionality
henrygerardmoore Sep 7, 2024
05bac2e
test fixes and remove unnecessary param
henrygerardmoore Sep 9, 2024
18f8c47
reduce duplicate operations and remove now-unused functions
henrygerardmoore Sep 9, 2024
0b57031
fix hold position behavior
henrygerardmoore Sep 9, 2024
ca7e2bd
fix test typo
henrygerardmoore Sep 9, 2024
70faa23
enable some CTG functionality and enable last test
henrygerardmoore Sep 10, 2024
5334217
add CTG-like state publisher
henrygerardmoore Sep 10, 2024
ac4df6d
add clarifying comment
henrygerardmoore Sep 11, 2024
0287201
fix state publisher bug
henrygerardmoore Sep 11, 2024
5f2ab29
fix CTG functionality
henrygerardmoore Sep 11, 2024
1ef6df3
initial commit of MAC visual test
henrygerardmoore Sep 12, 2024
7dbfe24
remove unused headers
henrygerardmoore Sep 12, 2024
0ae57cf
remove debug message
henrygerardmoore Sep 16, 2024
1b5a75e
apply Bijou's fix to on_configure function
henrygerardmoore Sep 17, 2024
111c57f
remove erroneous error message
henrygerardmoore Sep 17, 2024
d56a0fd
wip adding new test
henrygerardmoore Sep 17, 2024
29644e3
wip adding new test 2
henrygerardmoore Sep 18, 2024
fdaa30d
wip adding test for MAC
henrygerardmoore Sep 18, 2024
7bd02cb
get desired state working with test
henrygerardmoore Sep 19, 2024
1760468
create minimal feedback publish
henrygerardmoore Sep 19, 2024
f162526
get feedback publisher working
henrygerardmoore Sep 20, 2024
c7e3126
get test working with MAC after reset
henrygerardmoore Sep 20, 2024
48d7d9c
changes noticed with Bijou pair programming
henrygerardmoore Sep 23, 2024
ae96f48
add more useful information to MAC state publisher
henrygerardmoore Sep 23, 2024
c2be2d3
add another message to MAC state
henrygerardmoore Sep 24, 2024
58cb2d8
fix MAC behavior after resets and with set points between merged traj…
henrygerardmoore Sep 25, 2024
3d0c000
change joint limiter TODOs to be assigned to Bijou
henrygerardmoore Sep 27, 2024
29ea480
Add instantiation of single joint limiter for MAC
bijoua29 Sep 29, 2024
a558492
Remove todo comment
bijoua29 Sep 29, 2024
78677e4
remove debug vars
henrygerardmoore Sep 30, 2024
873a622
Merge pull request #3 from SchillingRobotics/bijoua/integrate_joint_l…
bijoua29 Sep 30, 2024
5c0b5f8
Fix open_closed_enable_disable test
bijoua29 Sep 30, 2024
2ba8d02
Fix for joint limiting
bijoua29 Oct 2, 2024
d7c5180
Tests for joint limiting
bijoua29 Oct 2, 2024
36c0fca
try fixing reset logic
henrygerardmoore Oct 3, 2024
732136b
change to check end iterator
henrygerardmoore Oct 3, 2024
67cf076
check that iterator is valid
henrygerardmoore Oct 3, 2024
2d4726a
change to newer header
henrygerardmoore Oct 3, 2024
ccb5047
try setting the time correctly and zeroing accel
henrygerardmoore Oct 4, 2024
8d3b40b
Merge remote-tracking branch 'upstream/master' into JTC_interface_cha…
henrygerardmoore Oct 8, 2024
56b6c06
Add more data to MAC state
bijoua29 Oct 11, 2024
ab929c1
Add new data to MAC state and fix command output
bijoua29 Oct 11, 2024
924443e
Fix start time for new trajectory
bijoua29 Oct 11, 2024
00e9f63
fix for long interpolation between positions
henrygerardmoore Oct 10, 2024
3e875c3
Fix previous state when there is new trajectory
bijoua29 Oct 11, 2024
b1219f7
Reset previous state when starting new trajectory
bijoua29 Oct 12, 2024
f4335d7
Enforce that reliable update is processed
bijoua29 Oct 14, 2024
0eaf024
Add update of additional MAC state
bijoua29 Oct 14, 2024
05c3a97
allow per-axis time before trajectory
henrygerardmoore Oct 15, 2024
d549e0c
add debug messages for interpolation in trajectory
henrygerardmoore Oct 15, 2024
2ba68f6
Initialize size of logging variables
bijoua29 Oct 16, 2024
5ceff18
Change interpolation logging times to nanoseconds
bijoua29 Oct 16, 2024
c86b6b4
set point before traj vel and accel to 0
henrygerardmoore Oct 16, 2024
e2f2702
Remove fix for reset command as it is now fixed upstream
bijoua29 Oct 16, 2024
227ab9a
Merge reliable traj msg to previous traj msg if not processed yet
bijoua29 Oct 22, 2024
1cf10c3
Fix wraparound check for first point in axis trajectory
bijoua29 Oct 24, 2024
72a803d
Fix angle wraparound to handle all trajectory points
bijoua29 Oct 24, 2024
fb353cb
Merge tag '4.16.0' into JTC_interface_changes
bijoua29 Dec 3, 2024
26e8a0a
Update for rolling sync on 24-11-26
bijoua29 Dec 4, 2024
4994487
Merge remote-tracking branch 'upstream/master' into JTC_interface_cha…
bijoua29 Dec 16, 2024
3777a20
Fix deprecated realtime tools header file
bijoua29 Dec 17, 2024
637616a
Merge tag '4.19.0' into JTC_interface_changes
bijoua29 Jan 17, 2025
0ea2a5b
Update for rolling sync on 2025-01-17
bijoua29 Jan 18, 2025
cebe96a
Merge pull request #5 from SchillingRobotics/rolling_update_2025_01_17
bijoua29 Jan 19, 2025
0e5d4cd
Update for deprecated pid class methods
bijoua29 Feb 18, 2025
7b6aa3d
Merge tag '4.20.0' into bijoua/updates_rolling_sync_2025-02-14
bijoua29 Feb 18, 2025
75638ab
Remove dependency on ruckig as it was removed from JTC
bijoua29 Feb 20, 2025
52d754e
Align pid controller and other code to upstream
bijoua29 Feb 20, 2025
28c3ad5
Merge pull request #6 from SchillingRobotics/bijoua/updates_rolling_s…
bijoua29 Feb 20, 2025
c6ea1bc
Fix failure in on_activate if feedback not available
bijoua29 Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright (c) 2023 Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef JOINT_TRAJECTORY_CONTROLLER__CARTESIAN_TRAJECTORY_GENERATOR_HPP_
#define JOINT_TRAJECTORY_CONTROLLER__CARTESIAN_TRAJECTORY_GENERATOR_HPP_

#include <memory>
#include <string>
#include <unordered_map>
#include <vector>

#include "control_msgs/msg/cartesian_trajectory_generator_state.hpp"
#include "geometry_msgs/msg/pose.hpp"
#include "geometry_msgs/msg/transform_stamped.hpp"
#include "joint_limits/joint_limits.hpp"
#include "joint_trajectory_controller/joint_trajectory_controller.hpp"
#include "nav_msgs/msg/odometry.hpp"
#include "trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp"

using namespace std::chrono_literals; // NOLINT

namespace cartesian_trajectory_generator
{
class CartesianTrajectoryGenerator : public joint_trajectory_controller::JointTrajectoryController
{
public:
JOINT_TRAJECTORY_CONTROLLER_PUBLIC
CartesianTrajectoryGenerator();

/**
* @brief command_interface_configuration This controller requires the position and velocity
* state interfaces for the controlled joints
*/
JOINT_TRAJECTORY_CONTROLLER_PUBLIC
controller_interface::InterfaceConfiguration state_interface_configuration() const override;

JOINT_TRAJECTORY_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_configure(
const rclcpp_lifecycle::State & previous_state) override;

JOINT_TRAJECTORY_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_activate(
const rclcpp_lifecycle::State & previous_state) override;

using ControllerReferenceMsg = trajectory_msgs::msg::MultiDOFJointTrajectoryPoint;
using ControllerFeedbackMsg = nav_msgs::msg::Odometry;

protected:
bool read_state_from_hardware(JointTrajectoryPoint & state) override;

using JointTrajectoryPoint = trajectory_msgs::msg::JointTrajectoryPoint;
JOINT_TRAJECTORY_CONTROLLER_PUBLIC
void publish_state(
const rclcpp::Time & time, const JointTrajectoryPoint & desired_state,
const JointTrajectoryPoint & current_state, const JointTrajectoryPoint & state_error,
const JointTrajectoryPoint & splines_output, const JointTrajectoryPoint & ruckig_input_target,
const JointTrajectoryPoint & ruckig_input) override;

// Command subscribers and Controller State publisher
rclcpp::Subscription<ControllerReferenceMsg>::SharedPtr ref_subscriber_ = nullptr;
rclcpp::Subscription<ControllerReferenceMsg>::SharedPtr ref_subscriber_reliable_ = nullptr;
realtime_tools::RealtimeBuffer<std::shared_ptr<ControllerReferenceMsg>> reference_world_;

rclcpp::Subscription<ControllerFeedbackMsg>::SharedPtr feedback_subscriber_ = nullptr;
realtime_tools::RealtimeBuffer<std::shared_ptr<ControllerFeedbackMsg>> feedback_;

trajectory_msgs::msg::JointTrajectoryPoint control_output_local_;

private:
void reference_callback(const std::shared_ptr<ControllerReferenceMsg> msg);

using CartControllerStateMsg = control_msgs::msg::CartesianTrajectoryGeneratorState;
using CartStatePublisher = realtime_tools::RealtimePublisher<CartControllerStateMsg>;
using CartStatePublisherPtr = std::unique_ptr<CartStatePublisher>;
rclcpp::Publisher<CartControllerStateMsg>::SharedPtr cart_publisher_;
CartStatePublisherPtr cart_state_publisher_;

std::vector<joint_limits::JointLimits> configured_joint_limits_;

// storage of last received measured position to
geometry_msgs::msg::Pose last_received_measured_position_;
};

} // namespace cartesian_trajectory_generator

#endif // JOINT_TRAJECTORY_CONTROLLER__CARTESIAN_TRAJECTORY_GENERATOR_HPP_
Loading
Loading