-
Notifications
You must be signed in to change notification settings - Fork 268
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
ForceTorque system: write WrenchMeasured to ECM #2494
Merged
Merged
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8ee0dfd
Specify System::PreUpdate, Update execution order
scpeters ad2b07d
ForceTorque system: use Update, not PostUpdate
scpeters d69603f
Fix comment in physics system
scpeters dfb392b
Add WrenchMeasured component
scpeters ea1c912
Write WrenchMeasured to ECM in ForceTorque::Update
scpeters d1b1836
fix variable shadowing
scpeters 21f80ae
Add missing includes
scpeters 175d934
Remove priority keys with empty vectors
scpeters 6b2bac6
Merge branch 'scpeters/system_execution_order_ionic' into scpeters/fo…
scpeters 9a68307
fix copyright year
scpeters a0e2ee4
Add expectations to SystemManager_TEST
scpeters 8931eab
ForceTorque system: always write to the ECM
scpeters 52a73a3
Model.hh: add nested model accessor methods
scpeters ed6a5fe
Minor changes to force_torque_system test
scpeters 2a2ebc1
Test WrenchMeasured component in force_torque test
scpeters e856465
Merge branch 'scpeters/system_execution_order_ionic' into scpeters/fo…
scpeters 5c82602
Merge branch 'main' into scpeters/forcetorque_write_ecm
scpeters c6fedb1
Only write WrenchMeasured if component exists
scpeters bd0c153
Update Migration guide
scpeters ba5408f
Set priority for python's joint_test.sdf
scpeters 1f76c6a
sensor_TEST.py: move PreUpdate callback to Update
scpeters 9a7785e
fix spelling in on_post_update_cb
scpeters 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 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 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 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,57 @@ | ||
/* | ||
* Copyright (C) 2024 Open Source Robotics Foundation | ||
* | ||
* 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 GZ_SIM_COMPONENTS_WRENCHMEASURED_HH_ | ||
#define GZ_SIM_COMPONENTS_WRENCHMEASURED_HH_ | ||
|
||
#include <gz/msgs/wrench.pb.h> | ||
|
||
#include <gz/sim/components/Factory.hh> | ||
#include <gz/sim/components/Component.hh> | ||
#include <gz/sim/components/Serialization.hh> | ||
#include <gz/sim/config.hh> | ||
|
||
namespace gz | ||
{ | ||
namespace sim | ||
{ | ||
// Inline bracket to help doxygen filtering. | ||
inline namespace GZ_SIM_VERSION_NAMESPACE { | ||
|
||
namespace components | ||
{ | ||
/// \brief Wrench measured by a ForceTorqueSensor in SI units (Nm for torque, | ||
/// N for force). | ||
/// The wrench is expressed in the Sensor frame and the force component is | ||
/// applied at the sensor origin. | ||
/// \note The term Wrench is used here to mean a pair of 3D vectors representing | ||
/// torque and force quantities expressed in a given frame and where the force | ||
/// is applied at the origin of the frame. This is different from the Wrench | ||
/// used in screw theory. | ||
/// \note The value of force_offset in msgs::Wrench is ignored for this | ||
/// component. The force is assumed to be applied at the origin of the sensor | ||
/// frame. | ||
using WrenchMeasured = | ||
Component<msgs::Wrench, class WrenchMeasuredTag, | ||
serializers::MsgSerializer>; | ||
GZ_SIM_REGISTER_COMPONENT("gz_sim_components.WrenchMeasured", | ||
WrenchMeasured) | ||
} // namespace components | ||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains 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 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 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 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense for users to indicate that they want data to be written to ECM by creating a
components::WrenchMeasured
component? here we would just check for the presence of that component, e.g.Probably not going to make much perf difference for this system since the sensor
Update
call should be relatively fast and same for writing force torque values to ECM. It would be nice to keep things consistent if we do decide to port this functionality to other sensors, e.g. contact or rendering sensorsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh, I like that. Let me give that a try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c6fedb1