Ignition Gazebo

API Reference

5.0.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>
31 #include <ignition/msgs/scene.pb.h>
34 #include <ignition/msgs/time.pb.h>
36 
37 #include <chrono>
38 #include <string>
39 
42 #include <sdf/Actor.hh>
43 #include <sdf/Atmosphere.hh>
44 #include <sdf/Collision.hh>
45 #include <sdf/Geometry.hh>
46 #include <sdf/Gui.hh>
47 #include <sdf/JointAxis.hh>
48 #include <sdf/Light.hh>
49 #include <sdf/Material.hh>
50 #include <sdf/Noise.hh>
51 #include <sdf/ParticleEmitter.hh>
52 #include <sdf/Physics.hh>
53 #include <sdf/Scene.hh>
54 #include <sdf/Sensor.hh>
55 
56 #include "ignition/gazebo/config.hh"
57 #include "ignition/gazebo/Export.hh"
58 #include "ignition/gazebo/Types.hh"
59 
60 namespace ignition
61 {
62  namespace gazebo
63  {
64  // Inline bracket to help doxygen filtering.
65  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
70  void IGNITION_GAZEBO_VISIBLE
71  set(msgs::SensorNoise *_msg, const sdf::Noise &_sdf);
72 
77  void IGNITION_GAZEBO_VISIBLE
78  set(msgs::WorldStatistics *_msg, const UpdateInfo &_in);
79 
85  void IGNITION_GAZEBO_VISIBLE
86  set(msgs::Time *_msg, const std::chrono::steady_clock::duration &_in);
87 
92  template<class Out>
93  Out convert(const sdf::Geometry &/*_in*/)
94  {
95  Out::ConversionNotImplemented;
96  }
97 
102  template<>
104 
109  template<class Out>
110  Out convert(const msgs::Pose &/*_in*/)
111  {
112  Out::ConversionNotImplemented;
113  }
114 
118  template<>
119  math::Pose3d convert(const msgs::Pose &_in);
120 
125  template<class Out>
126  Out convert(const msgs::Geometry &/*_in*/)
127  {
128  Out::ConversionNotImplemented;
129  }
130 
135  template<>
137 
142  template<class Out>
143  Out convert(const sdf::Material &/*_in*/)
144  {
145  Out::ConversionNotImplemented;
146  }
147 
152  template<>
154 
159  template<class Out>
160  Out convert(const msgs::Material &/*_in*/)
161  {
162  Out::ConversionNotImplemented;
163  }
164 
169  template<>
171 
176  template<class Out>
177  Out convert(const sdf::Actor &/*_in*/)
178  {
179  Out::ConversionNotImplemented;
180  }
181 
186  template<>
187  msgs::Actor convert(const sdf::Actor &_in);
188 
193  template<class Out>
194  Out convert(const msgs::Actor& /*_in*/)
195  {
196  Out::ConversionNotImplemented;
197  }
198 
203  template<>
204  sdf::Actor convert(const msgs::Actor &_in);
205 
210  template<class Out>
211  Out convert(const sdf::Light &/*_in*/)
212  {
213  Out::ConversionNotImplemented;
214  }
215 
220  template<>
221  msgs::Light convert(const sdf::Light &_in);
222 
227  std::string IGNITION_GAZEBO_VISIBLE
228  convert(const sdf::LightType &_in);
229 
234  template<class Out>
235  Out convert(const msgs::Light& /*_in*/)
236  {
237  Out::ConversionNotImplemented;
238  }
239 
244  template<>
245  sdf::Light convert(const msgs::Light &_in);
246 
250  sdf::LightType IGNITION_GAZEBO_VISIBLE
251  convert(const std::string &_in);
252 
257  template<class Out>
258  Out convert(const sdf::Gui &/*_in*/)
259  {
260  Out::ConversionNotImplemented;
261  }
262 
266  template<>
267  msgs::GUI convert(const sdf::Gui &_in);
268 
273  template<class Out>
274  Out convert(const std::chrono::steady_clock::duration &/*_in*/)
275  {
276  Out::ConversionNotImplemented;
277  }
278 
283  template<>
284  msgs::Time convert(const std::chrono::steady_clock::duration &_in);
285 
290  template<class Out>
291  Out convert(const msgs::Time &/*_in*/)
292  {
293  Out::ConversionNotImplemented;
294  }
295 
300  template<>
301  std::chrono::steady_clock::duration convert(const msgs::Time &_in);
302 
307  template<class Out>
308  Out convert(const math::Inertiald &/*_in*/)
309  {
310  Out::ConversionNotImplemented;
311  }
312 
317  template<>
319 
324  template<class Out>
325  Out convert(const msgs::Inertial &/*_in*/)
326  {
327  Out::ConversionNotImplemented;
328  }
329 
334  template<>
336 
341  template<class Out>
342  Out convert(const sdf::JointAxis &/*_in*/)
343  {
344  Out::ConversionNotImplemented;
345  }
346 
351  template<>
352  msgs::Axis convert(const sdf::JointAxis &_in);
353 
358  template<class Out>
359  Out convert(const msgs::Axis &/*_in*/)
360  {
361  Out::ConversionNotImplemented;
362  }
363 
368  template<>
369  sdf::JointAxis convert(const msgs::Axis &_in);
370 
375  template<class Out>
376  Out convert(const sdf::Scene &/*_in*/)
377  {
378  Out::ConversionNotImplemented;
379  }
380 
384  template<>
385  msgs::Scene convert(const sdf::Scene &_in);
386 
391  template<class Out>
392  Out convert(const msgs::Scene &/*_in*/)
393  {
394  Out::ConversionNotImplemented;
395  }
396 
401  template<>
402  sdf::Scene convert(const msgs::Scene &_in);
403 
408  template<class Out>
409  Out convert(const sdf::Atmosphere &/*_in*/)
410  {
411  Out::ConversionNotImplemented;
412  }
413 
418  template<>
420 
425  template<class Out>
426  Out convert(const msgs::Atmosphere &/*_in*/)
427  {
428  Out::ConversionNotImplemented;
429  }
430 
435  template<>
437 
438 
443  template<class Out>
444  Out convert(const sdf::Physics &/*_in*/)
445  {
446  Out::ConversionNotImplemented;
447  }
448 
453  template<>
454  msgs::Physics convert(const sdf::Physics &_in);
455 
460  template<class Out>
461  Out convert(const msgs::Physics &/*_in*/)
462  {
463  Out::ConversionNotImplemented;
464  }
465 
470  template<>
471  sdf::Physics convert(const msgs::Physics &_in);
472 
473 
478  template<class Out>
479  Out convert(const sdf::Sensor &/*_in*/)
480  {
481  Out::ConversionNotImplemented;
482  }
483 
488  template<>
489  msgs::Sensor convert(const sdf::Sensor &_in);
490 
495  template<class Out>
496  Out convert(const msgs::Sensor &/*_in*/)
497  {
498  Out::ConversionNotImplemented;
499  }
500 
505  template<>
506  sdf::Sensor convert(const msgs::Sensor &_in);
507 
512  template<class Out>
513  Out convert(const msgs::SensorNoise &/*_in*/)
514  {
515  Out::ConversionNotImplemented;
516  }
517 
522  template<>
523  sdf::Noise convert(const msgs::SensorNoise &_in);
524 
530  template<class Out>
531  Out convert(const msgs::WorldStatistics &/*_in*/)
532  {
533  Out::ConversionNotImplemented;
534  }
535 
540  template<>
542 
547  template<class Out>
548  Out convert(const UpdateInfo &/*_in*/)
549  {
550  Out::ConversionNotImplemented;
551  }
552 
557  template<>
559 
564  template<class Out>
565  Out convert(const sdf::Collision &/*_in*/)
566  {
567  Out::ConversionNotImplemented;
568  }
569 
574  template<>
576 
581  template<class Out>
582  Out convert(const msgs::Collision &/*_in*/)
583  {
584  Out::ConversionNotImplemented;
585  }
586 
591  template<>
593 
598  template<class Out>
599  Out convert(const std::string &/*_in*/)
600  {
601  Out::ConversionNotImplemented;
602  }
603 
607  template<>
609 
614  template<class Out>
615  Out convert(const math::AxisAlignedBox &/*_in*/)
616  {
617  Out::ConversionNotImplemented;
618  }
619 
624  template<>
626 
632  template<class Out>
633  Out convert(const msgs::AxisAlignedBox &/*_in*/)
634  {
635  Out::ConversionNotImplemented;
636  }
637 
642  template<>
644 
650  template<class Out>
651  Out convert(const sdf::ParticleEmitter &/*_in*/)
652  {
653  Out::ConversionNotImplemented;
654  }
655 
660  template<>
662 
668  template<class Out>
669  Out convert(const msgs::ParticleEmitter &/*_in*/)
670  {
671  Out::ConversionNotImplemented;
672  }
673 
678  template<>
680  }
681  }
682 }
683 #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
Component< msgs::ParticleEmitter, class ParticleEmitterTag, serializers::MsgSerializer > ParticleEmitter
A component that contains a particle emitter.
Definition: include/ignition/gazebo/components/ParticleEmitter.hh:37
Component< std::string, class LightTypeTag, serializers::StringSerializer > LightType
A component that contains the light type. This is a simple wrapper around std::string.
Definition: LightType.hh:39
Information passed to systems on the update callback.
Definition: Types.hh:36
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:93
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:80
This library is part of the Ignition Robotics project.
Component< sdf::Physics, class PhysicsTag, serializers::PhysicsSerializer > Physics
A component type that contains the physics properties of the World entity.
Definition: include/ignition/gazebo/components/Physics.hh:50
Component< NoData, class SensorTag > Sensor
A component that identifies an entity as being a link.
Definition: Sensor.hh:35