-
Notifications
You must be signed in to change notification settings - Fork 399
Add filtering capability to ft_broadcaster #1814
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
Merged
christophfroehlich
merged 46 commits into
ros-controls:master
from
pal-robotics-forks:ft_broadcaster/add-filtering-capability
Sep 3, 2025
Merged
Changes from 37 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
fe36000
Add support for publishing additional topics to the FTS Broadcaster
destogl ef7ad6a
Added filtering capabilities
guihomework a47926a
Added more tests with filters
guihomework a413217
Removed helper that only shows declared params
guihomework 3652ab1
Fixed filter handling and unitialized frame_id
guihomework 8163413
Added test for additional_frames_to_publish
guihomework a58bd31
Merge branch 'master' into add-filtering-capability-to-fts-broadcaste…
christophfroehlich 31e79e2
Fix test parameters
christophfroehlich 41853ab
Merge remote-tracking branch 'origin/master' into add-filtering-capab…
christophfroehlich c9b52f1
compile filters from source on humble
christophfroehlich 206da96
Merge branch 'master' into add-filtering-capability-to-fts-broadcaste…
bmagyar 0759030
Use filters from binary
christophfroehlich aa12321
Update ros2_controllers-not-released.humble.repos
christophfroehlich 3d15fa5
Fix pre-commit
christophfroehlich b431110
Merge remote-tracking branch 'origin/master' into add-filtering-capab…
christophfroehlich a78dab0
Fix the tests
christophfroehlich 714400d
Merge branch 'master' into add-filtering-capability-to-fts-broadcaste…
christophfroehlich 834e1ad
Apply suggestions from code review
christophfroehlich 98fac42
Apply suggestions from code review
christophfroehlich 3a6978c
Use correct hpp file
christophfroehlich 204e5d3
Merge branch 'master' into add-filtering-capability-to-fts-broadcaste…
christophfroehlich 63dcce2
Fix format
christophfroehlich cad2b29
Update description of limit() function in speed_limiter (#1793)
Amronos c6b8ca7
Improve paths filtering of docs CI job (#1796)
christophfroehlich da21fd4
fix rqt_joint_trajectory_controller for robots with namespace (#1792)
oscar-lima 8c1fa73
Mecanum Drive: Populate the pose covariance matrix (#1772)
hilary-luo 284c4a1
Explicit cast `rcutils_duration_value_t` (#1808)
christophfroehlich 9619195
Applying review suggestions
OscarMrZ b1de60b
Simplified testing
OscarMrZ 4062e15
Improving logic to check if there's a filter chain
OscarMrZ ad4dcfa
Fixing with pre-commit
OscarMrZ 59eb2ea
Merge branch 'ros-controls:master' into ft_broadcaster/add-filtering-…
OscarMrZ 45647df
Merge branch 'ros-controls:master' into ft_broadcaster/add-filtering-…
OscarMrZ 61e9b55
Removing unnecesarily added deps
OscarMrZ 3afca35
Improving tests with dummy filter
OscarMrZ 7306d25
Removing unnecessary temporary objects created while calling emplace_…
OscarMrZ 94106c2
Merge branch 'master' into ft_broadcaster/add-filtering-capability
christophfroehlich df9fe94
Remove unnecessary parameter dep
OscarMrZ b8c1af3
Updated docs
OscarMrZ 888a52f
Merge branch 'master' into ft_broadcaster/add-filtering-capability
christophfroehlich 817c21b
Properly checking chain length
OscarMrZ d7f617a
Merge branch 'ros-controls:master' into ft_broadcaster/add-filtering-…
OscarMrZ 06cdbab
Simplify filter check
OscarMrZ 3e6d7d1
Add the filter chain length clarifications
saikishor b1fe2f5
Merge branch 'master' into ft_broadcaster/add-filtering-capability
saikishor 72916d3
Fix pre-commit
saikishor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
// Copyright (c) 2025, PAL Robotics | ||
// | ||
// 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. | ||
|
||
/* | ||
* Authors: Oscar Martinez | ||
*/ | ||
|
||
#include <rclcpp/logger.hpp> | ||
#include <rclcpp/logging.hpp> | ||
|
||
#include "geometry_msgs/msg/wrench_stamped.hpp" | ||
|
||
#include "filters/increment.hpp" | ||
|
||
namespace filters | ||
{ | ||
|
||
template <> | ||
bool IncrementFilter<geometry_msgs::msg::WrenchStamped>::update( | ||
const geometry_msgs::msg::WrenchStamped & data_in, geometry_msgs::msg::WrenchStamped & data_out) | ||
{ | ||
if (!this->configured_) | ||
{ | ||
throw std::runtime_error("Filter is not configured"); | ||
} | ||
|
||
// Just increment every value | ||
data_out.wrench.force.x = data_in.wrench.force.x + 1; | ||
data_out.wrench.force.y = data_in.wrench.force.y + 1; | ||
data_out.wrench.force.z = data_in.wrench.force.z + 1; | ||
data_out.wrench.torque.x = data_in.wrench.torque.x + 1; | ||
data_out.wrench.torque.y = data_in.wrench.torque.y + 1; | ||
data_out.wrench.torque.z = data_in.wrench.torque.z + 1; | ||
|
||
return true; | ||
} | ||
|
||
} // namespace filters | ||
|
||
#include "pluginlib/class_list_macros.hpp" | ||
|
||
PLUGINLIB_EXPORT_CLASS( | ||
filters::IncrementFilter<geometry_msgs::msg::WrenchStamped>, | ||
filters::FilterBase<geometry_msgs::msg::WrenchStamped>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<class_libraries> | ||
<library path="dummy_filter"> | ||
<class name="filters/IncrementFilterWrench" type="filters::IncrementFilter<geometry_msgs::msg::WrenchStamped>" base_class_type="filters::FilterBase<geometry_msgs::msg::WrenchStamped>"> | ||
<description> | ||
This is a increment filter which works on a wrench message. | ||
</description> | ||
</class> | ||
</library> | ||
</class_libraries> |
9 changes: 8 additions & 1 deletion
9
force_torque_sensor_broadcaster/test/force_torque_sensor_broadcaster_params.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
test_force_torque_sensor_broadcaster: | ||
ros__parameters: | ||
|
||
frame_id: "fts_sensor_frame" | ||
test_force_torque_sensor_broadcaster_with_chain: | ||
ros__parameters: | ||
frame_id: "fts_sensor_frame" | ||
sensor_name: "fts_sensor" | ||
sensor_filter_chain: | ||
filter1: | ||
name: dummy | ||
type: filters/IncrementFilterWrench |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.