Ignition Physics

API Reference

5.1.0
PrismaticJoint.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 
18 #ifndef IGNITION_PHYSICS_PRISMATICJOINT_HH_
19 #define IGNITION_PHYSICS_PRISMATICJOINT_HH_
20 
21 #include <string>
22 
25 
26 namespace ignition
27 {
28  namespace physics
29  {
30  IGN_PHYSICS_DECLARE_JOINT_TYPE(PrismaticJoint)
31 
32  class IGNITION_PHYSICS_VISIBLE GetPrismaticJointProperties
33  : public virtual FeatureWithRequirements<PrismaticJointCast>
34  {
36  public: template <typename PolicyT, typename FeaturesT>
37  class PrismaticJoint : public virtual Entity<PolicyT, FeaturesT>
38  {
39  public: using Axis =
40  typename FromPolicy<PolicyT>::template Use<LinearVector>;
41 
49  public: Axis GetAxis() const;
50  };
51 
54  public: template <typename PolicyT>
55  class Implementation : public virtual Feature::Implementation<PolicyT>
56  {
57  public: using Axis =
58  typename FromPolicy<PolicyT>::template Use<LinearVector>;
59 
60  public: virtual Axis GetPrismaticJointAxis(
61  const Identity &_id) const = 0;
62  };
63  };
64 
68  class IGNITION_PHYSICS_VISIBLE SetPrismaticJointProperties
69  : public virtual FeatureWithRequirements<PrismaticJointCast>
70  {
72  public: template <typename PolicyT, typename FeaturesT>
73  class PrismaticJoint : public virtual Entity<PolicyT, FeaturesT>
74  {
75  public: using Axis =
76  typename FromPolicy<PolicyT>::template Use<LinearVector>;
77 
83  public: void SetAxis(const Axis &_axis);
84  };
85 
88  public: template <typename PolicyT>
89  class Implementation : public virtual Feature::Implementation<PolicyT>
90  {
91  public: using Axis =
92  typename FromPolicy<PolicyT>::template Use<LinearVector>;
93 
95  public: virtual void SetPrismaticJointAxis(
96  const Identity &_id, const Axis &_axis) = 0;
97  };
98  };
99 
103  class IGNITION_PHYSICS_VISIBLE AttachPrismaticJointFeature
104  : public virtual FeatureWithRequirements<PrismaticJointCast>
105  {
106  public: template <typename PolicyT, typename FeaturesT>
107  class Link : public virtual Feature::Link<PolicyT, FeaturesT>
108  {
109  public: using Axis =
110  typename FromPolicy<PolicyT>::template Use<LinearVector>;
111 
112  public: using JointPtrType = PrismaticJointPtr<PolicyT, FeaturesT>;
113 
126  public: JointPtrType AttachPrismaticJoint(
127  const BaseLinkPtr<PolicyT> &_parent,
128  const std::string &_name = "prismatic",
129  const Axis &_axis = Axis::UnitX());
130  };
131 
132  public: template <typename PolicyT>
133  class Implementation : public virtual Feature::Implementation<PolicyT>
134  {
135  public: using Axis =
136  typename FromPolicy<PolicyT>::template Use<LinearVector>;
137 
148  public: virtual Identity AttachPrismaticJoint(
149  const Identity &_childID,
150  const BaseLinkPtr<PolicyT> &_parent,
151  const std::string &_name,
152  const Axis &_axis) = 0;
153  };
154  };
155  }
156 }
157 
158 #include <ignition/physics/detail/PrismaticJoint.hh>
159 
160 #endif
If your feature is known to require any other features, then you should have your feature class inher...
Definition: FeatureList.hh:108
This is the base class of all "proxy objects". The "proxy objects" are essentially interfaces into th...
Definition: Entity.hh:216
IGN_PHYSICS_DECLARE_JOINT_TYPE(FixedJoint) class AttachFixedJointFeature
Definition: FixedJoint.hh:29
This struct is used to conveniently convert from a policy to a geometric type. Example usage: ...
Definition: Geometry.hh:77
The API for setting basic prismatic joint properties.
Definition: PrismaticJoint.hh:73
STL class.
typename FromPolicy< PolicyT >::template Use< LinearVector > Axis
Definition: PrismaticJoint.hh:76
typename FromPolicy< PolicyT >::template Use< LinearVector > Axis
Definition: PrismaticJoint.hh:136
Provide the API for attaching a Link to another Link (or directly to the World) with a prismatic join...
Definition: PrismaticJoint.hh:103
typename FromPolicy< PolicyT >::template Use< LinearVector > Axis
Definition: PrismaticJoint.hh:92
Provide the API for setting a prismatic joint&#39;s axis. Not all physics engines are able to change prop...
Definition: PrismaticJoint.hh:68