-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport nonbreaking changes from ionic (#2552)
* Model.hh: add ModelByName and ModelCount APIs Backport nested model accessor APIs from #2494. * Add WrenchMeasured component * Physics.cc: fix typo in comment * sensor_TEST.py: move PreUpdate callback to Update The test's PreUpdate callback assumes that it executes after the ForceTorque::PreUpdate, so just move it to Update to gurantee it. Also fix a spelling error in the callback variable names. * fix spelling in on_post_update_cb * backport minor fixes to force-torque test * Include System.hh from some systems, add comment Signed-off-by: Steve Peters <[email protected]>
- Loading branch information
Showing
10 changed files
with
128 additions
and
13 deletions.
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
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
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