|
| 1 | +/* |
| 2 | + * Copyright (C) 2024 Open Source Robotics Foundation |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + * |
| 16 | + */ |
| 17 | +#ifndef GZ_SIM_COMPONENTS_WRENCHMEASURED_HH_ |
| 18 | +#define GZ_SIM_COMPONENTS_WRENCHMEASURED_HH_ |
| 19 | + |
| 20 | +#include <gz/msgs/wrench.pb.h> |
| 21 | + |
| 22 | +#include <gz/sim/components/Factory.hh> |
| 23 | +#include <gz/sim/components/Component.hh> |
| 24 | +#include <gz/sim/components/Serialization.hh> |
| 25 | +#include <gz/sim/config.hh> |
| 26 | + |
| 27 | +namespace gz |
| 28 | +{ |
| 29 | +namespace sim |
| 30 | +{ |
| 31 | +// Inline bracket to help doxygen filtering. |
| 32 | +inline namespace GZ_SIM_VERSION_NAMESPACE { |
| 33 | + |
| 34 | +namespace components |
| 35 | +{ |
| 36 | +/// \brief Wrench measured by a ForceTorqueSensor in SI units (Nm for torque, |
| 37 | +/// N for force). |
| 38 | +/// The wrench is expressed in the Sensor frame and the force component is |
| 39 | +/// applied at the sensor origin. |
| 40 | +/// \note The term Wrench is used here to mean a pair of 3D vectors representing |
| 41 | +/// torque and force quantities expressed in a given frame and where the force |
| 42 | +/// is applied at the origin of the frame. This is different from the Wrench |
| 43 | +/// used in screw theory. |
| 44 | +/// \note The value of force_offset in msgs::Wrench is ignored for this |
| 45 | +/// component. The force is assumed to be applied at the origin of the sensor |
| 46 | +/// frame. |
| 47 | +using WrenchMeasured = |
| 48 | + Component<msgs::Wrench, class WrenchMeasuredTag, |
| 49 | + serializers::MsgSerializer>; |
| 50 | +GZ_SIM_REGISTER_COMPONENT("gz_sim_components.WrenchMeasured", |
| 51 | + WrenchMeasured) |
| 52 | +} // namespace components |
| 53 | +} |
| 54 | +} |
| 55 | +} |
| 56 | + |
| 57 | +#endif |
0 commit comments