Ignition Gazebo

API Reference

3.7.0
Conversions.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 #ifndef IGNITION_GAZEBO_CONVERSIONS_HH_
18 #define IGNITION_GAZEBO_CONVERSIONS_HH_
19 
20 #include <ignition/msgs/actor.pb.h>
22 #include <ignition/msgs/axis.pb.h>
25 #include <ignition/msgs/gui.pb.h>
27 #include <ignition/msgs/light.pb.h>
29 #include <ignition/msgs/scene.pb.h>
32 #include <ignition/msgs/time.pb.h>
34 
35 #include <chrono>
36 #include <string>
37 
40 #include <sdf/Actor.hh>
41 #include <sdf/Atmosphere.hh>
42 #include <sdf/Collision.hh>
43 #include <sdf/Geometry.hh>
44 #include <sdf/Gui.hh>
45 #include <sdf/JointAxis.hh>
46 #include <sdf/Light.hh>
47 #include <sdf/Material.hh>
48 #include <sdf/Noise.hh>
49 #include <sdf/Scene.hh>
50 #include <sdf/Sensor.hh>
51 
52 #include "ignition/gazebo/config.hh"
53 #include "ignition/gazebo/Export.hh"
54 #include "ignition/gazebo/Types.hh"
55 
56 namespace ignition
57 {
58  namespace gazebo
59  {
60  // Inline bracket to help doxygen filtering.
61  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
66  void set(msgs::SensorNoise *_msg, const sdf::Noise &_sdf);
67 
72  void set(msgs::WorldStatistics *_msg, const UpdateInfo &_in);
73 
79  void set(msgs::Time *_msg, const std::chrono::steady_clock::duration &_in);
80 
85  template<class Out>
86  Out convert(const sdf::Geometry &/*_in*/)
87  {
88  Out::ConversionNotImplemented;
89  }
90 
95  template<>
97 
102  template<class Out>
103  Out convert(const msgs::Pose &/*_in*/)
104  {
105  Out::ConversionNotImplemented;
106  }
107 
111  template<>
112  math::Pose3d convert(const msgs::Pose &_in);
113 
118  template<class Out>
119  Out convert(const msgs::Geometry &/*_in*/)
120  {
121  Out::ConversionNotImplemented;
122  }
123 
128  template<>
130 
135  template<class Out>
136  Out convert(const sdf::Material &/*_in*/)
137  {
138  Out::ConversionNotImplemented;
139  }
140 
145  template<>
147 
152  template<class Out>
153  Out convert(const msgs::Material &/*_in*/)
154  {
155  Out::ConversionNotImplemented;
156  }
157 
162  template<>
164 
169  template<class Out>
170  Out convert(const sdf::Actor &/*_in*/)
171  {
172  Out::ConversionNotImplemented;
173  }
174 
179  template<>
180  msgs::Actor convert(const sdf::Actor &_in);
181 
186  template<class Out>
187  Out convert(const msgs::Actor& /*_in*/)
188  {
189  Out::ConversionNotImplemented;
190  }
191 
196  template<>
197  sdf::Actor convert(const msgs::Actor &_in);
198 
203  template<class Out>
204  Out convert(const sdf::Light &/*_in*/)
205  {
206  Out::ConversionNotImplemented;
207  }
208 
213  template<>
214  msgs::Light convert(const sdf::Light &_in);
215 
216 
221  template<class Out>
222  Out convert(const msgs::Light& /*_in*/)
223  {
224  Out::ConversionNotImplemented;
225  }
226 
231  template<>
232  sdf::Light convert(const msgs::Light &_in);
233 
238  template<class Out>
239  Out convert(const sdf::Gui &/*_in*/)
240  {
241  Out::ConversionNotImplemented;
242  }
243 
247  template<>
248  msgs::GUI convert(const sdf::Gui &_in);
249 
254  template<class Out>
255  Out convert(const std::chrono::steady_clock::duration &/*_in*/)
256  {
257  Out::ConversionNotImplemented;
258  }
259 
264  template<>
265  msgs::Time convert(const std::chrono::steady_clock::duration &_in);
266 
271  template<class Out>
272  Out convert(const msgs::Time &/*_in*/)
273  {
274  Out::ConversionNotImplemented;
275  }
276 
281  template<>
282  std::chrono::steady_clock::duration convert(const msgs::Time &_in);
283 
288  template<class Out>
289  Out convert(const math::Inertiald &/*_in*/)
290  {
291  Out::ConversionNotImplemented;
292  }
293 
298  template<>
300 
305  template<class Out>
306  Out convert(const msgs::Inertial &/*_in*/)
307  {
308  Out::ConversionNotImplemented;
309  }
310 
315  template<>
317 
322  template<class Out>
323  Out convert(const sdf::JointAxis &/*_in*/)
324  {
325  Out::ConversionNotImplemented;
326  }
327 
332  template<>
333  msgs::Axis convert(const sdf::JointAxis &_in);
334 
339  template<class Out>
340  Out convert(const msgs::Axis &/*_in*/)
341  {
342  Out::ConversionNotImplemented;
343  }
344 
349  template<>
350  sdf::JointAxis convert(const msgs::Axis &_in);
351 
356  template<class Out>
357  Out convert(const sdf::Scene &/*_in*/)
358  {
359  Out::ConversionNotImplemented;
360  }
361 
365  template<>
366  msgs::Scene convert(const sdf::Scene &_in);
367 
372  template<class Out>
373  Out convert(const msgs::Scene &/*_in*/)
374  {
375  Out::ConversionNotImplemented;
376  }
377 
382  template<>
383  sdf::Scene convert(const msgs::Scene &_in);
384 
389  template<class Out>
390  Out convert(const sdf::Atmosphere &/*_in*/)
391  {
392  Out::ConversionNotImplemented;
393  }
394 
399  template<>
401 
406  template<class Out>
407  Out convert(const msgs::Atmosphere &/*_in*/)
408  {
409  Out::ConversionNotImplemented;
410  }
411 
416  template<>
418 
419 
424  template<class Out>
425  Out convert(const sdf::Sensor &/*_in*/)
426  {
427  Out::ConversionNotImplemented;
428  }
429 
434  template<>
435  msgs::Sensor convert(const sdf::Sensor &_in);
436 
441  template<class Out>
442  Out convert(const msgs::Sensor &/*_in*/)
443  {
444  Out::ConversionNotImplemented;
445  }
446 
451  template<>
452  sdf::Sensor convert(const msgs::Sensor &_in);
453 
458  template<class Out>
459  Out convert(const msgs::SensorNoise &/*_in*/)
460  {
461  Out::ConversionNotImplemented;
462  }
463 
468  template<>
469  sdf::Noise convert(const msgs::SensorNoise &_in);
470 
476  template<class Out>
477  Out convert(const msgs::WorldStatistics &/*_in*/)
478  {
479  Out::ConversionNotImplemented;
480  }
481 
486  template<>
488 
493  template<class Out>
494  Out convert(const UpdateInfo &/*_in*/)
495  {
496  Out::ConversionNotImplemented;
497  }
498 
503  template<>
505 
510  template<class Out>
511  Out convert(const sdf::Collision &/*_in*/)
512  {
513  Out::ConversionNotImplemented;
514  }
515 
520  template<>
522 
527  template<class Out>
528  Out convert(const msgs::Collision &/*_in*/)
529  {
530  Out::ConversionNotImplemented;
531  }
532 
537  template<>
539 
544  template<class Out>
545  Out convert(const std::string &/*_in*/)
546  {
547  Out::ConversionNotImplemented;
548  }
549 
553  template<>
555 
560  template<class Out>
561  Out convert(const math::AxisAlignedBox &/*_in*/)
562  {
563  Out::ConversionNotImplemented;
564  }
565 
570  template<>
572 
578  template<class Out>
579  Out convert(const msgs::AxisAlignedBox &/*_in*/)
580  {
581  Out::ConversionNotImplemented;
582  }
583 
588  template<>
590  }
591  }
592 }
593 #endif
Component< sdf::JointAxis, class JointAxisTag, serializers::JointAxisSerializer > JointAxis
A component that contains the joint axis . This is a simple wrapper around sdf::JointAxis.
Definition: JointAxis.hh:43
Component< sdf::Geometry, class GeometryTag, serializers::GeometrySerializer > Geometry
This component holds an entity&#39;s geometry.
Definition: Geometry.hh:46
Component< sdf::Atmosphere, class AtmosphereTag, serializers::AtmosphereSerializer > Atmosphere
This component holds atmosphere properties of the world.
Definition: Atmosphere.hh:44
Information passed to systems on the update callback.
Definition: Types.hh:37
Component< sdf::Scene, class SceneTag, serializers::SceneSerializer > Scene
This component holds scene properties of the world.
Definition: Scene.hh:45
STL class.
Out convert(const sdf::Geometry &)
Generic conversion from an SDF geometry to another type.
Definition: Conversions.hh:86
Component< sdf::Material, class MaterialTag, serializers::MaterialSerializer > Material
This component holds an entity&#39;s material.
Definition: Material.hh:44
Component< sdf::Light, class LightTag, serializers::LightSerializer > Light
This component contains light source information. For more information on lights, see SDF&#39;s Light ele...
Definition: Light.hh:48
Component< NoData, class CollisionTag > Collision
A component that identifies an entity as being a collision.
Definition: Collision.hh:42
Component< sdf::Actor, class ActorTag, serializers::ActorSerializer > Actor
This component contains actor source information. For more information on actors, see SDF&#39;s Actor ele...
Definition: Actor.hh:48
This library is part of the Ignition Robotics project.
Component< NoData, class SensorTag > Sensor
A component that identifies an entity as being a link.
Definition: Sensor.hh:35