Ignition Gazebo

API Reference

7.0.0~pre1
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  (void)_in;
96  Out::ConversionNotImplemented;
97  }
98 
103  template<>
105 
110  template<class Out>
111  Out convert(const msgs::Pose &_in)
112  {
113  (void)_in;
114  Out::ConversionNotImplemented;
115  }
116 
120  template<>
121  math::Pose3d convert(const msgs::Pose &_in);
122 
127  template<class Out>
128  Out convert(const msgs::Geometry &_in)
129  {
130  (void)_in;
131  Out::ConversionNotImplemented;
132  }
133 
138  template<>
140 
145  template<class Out>
146  Out convert(const sdf::Material &_in)
147  {
148  (void)_in;
149  Out::ConversionNotImplemented;
150  }
151 
156  template<>
158 
163  template<class Out>
164  Out convert(const msgs::Material &_in)
165  {
166  (void)_in;
167  Out::ConversionNotImplemented;
168  }
169 
174  template<>
176 
181  template<class Out>
182  Out convert(const sdf::Actor &_in)
183  {
184  (void)_in;
185  Out::ConversionNotImplemented;
186  }
187 
192  template<>
193  msgs::Actor convert(const sdf::Actor &_in);
194 
199  template<class Out>
200  Out convert(const msgs::Actor& _in)
201  {
202  (void)_in;
203  Out::ConversionNotImplemented;
204  }
205 
210  template<>
211  sdf::Actor convert(const msgs::Actor &_in);
212 
217  template<class Out>
218  Out convert(const sdf::Light &_in)
219  {
220  (void)_in;
221  Out::ConversionNotImplemented;
222  }
223 
228  template<>
229  msgs::Light convert(const sdf::Light &_in);
230 
235  std::string IGNITION_GAZEBO_VISIBLE
236  convert(const sdf::LightType &_in);
237 
242  template<class Out>
243  Out convert(const msgs::Light& _in)
244  {
245  (void)_in;
246  Out::ConversionNotImplemented;
247  }
248 
253  template<>
254  sdf::Light convert(const msgs::Light &_in);
255 
259  sdf::LightType IGNITION_GAZEBO_VISIBLE
260  convert(const std::string &_in);
261 
266  template<class Out>
267  Out convert(const sdf::Gui &_in)
268  {
269  (void)_in;
270  Out::ConversionNotImplemented;
271  }
272 
276  template<>
277  msgs::GUI convert(const sdf::Gui &_in);
278 
283  template<class Out>
284  Out convert(const std::chrono::steady_clock::duration &_in)
285  {
286  (void)_in;
287  Out::ConversionNotImplemented;
288  }
289 
294  template<>
295  msgs::Time convert(const std::chrono::steady_clock::duration &_in);
296 
301  template<class Out>
302  Out convert(const msgs::Time &_in)
303  {
304  (void)_in;
305  Out::ConversionNotImplemented;
306  }
307 
312  template<>
313  std::chrono::steady_clock::duration convert(const msgs::Time &_in);
314 
319  template<class Out>
320  Out convert(const math::Inertiald &_in)
321  {
322  (void)_in;
323  Out::ConversionNotImplemented;
324  }
325 
330  template<>
332 
337  template<class Out>
338  Out convert(const msgs::Inertial &_in)
339  {
340  (void)_in;
341  Out::ConversionNotImplemented;
342  }
343 
348  template<>
350 
355  template<class Out>
356  Out convert(const sdf::JointAxis &_in)
357  {
358  (void)_in;
359  Out::ConversionNotImplemented;
360  }
361 
366  template<>
367  msgs::Axis convert(const sdf::JointAxis &_in);
368 
373  template<class Out>
374  Out convert(const msgs::Axis &_in)
375  {
376  (void)_in;
377  Out::ConversionNotImplemented;
378  }
379 
384  template<>
385  sdf::JointAxis convert(const msgs::Axis &_in);
386 
391  template<class Out>
392  Out convert(const sdf::Scene &_in)
393  {
394  (void)_in;
395  Out::ConversionNotImplemented;
396  }
397 
401  template<>
402  msgs::Scene convert(const sdf::Scene &_in);
403 
408  template<class Out>
409  Out convert(const msgs::Scene &_in)
410  {
411  (void)_in;
412  Out::ConversionNotImplemented;
413  }
414 
419  template<>
420  sdf::Scene convert(const msgs::Scene &_in);
421 
426  template<class Out>
427  Out convert(const sdf::Atmosphere &_in)
428  {
429  (void)_in;
430  Out::ConversionNotImplemented;
431  }
432 
437  template<>
439 
444  template<class Out>
445  Out convert(const msgs::Atmosphere &_in)
446  {
447  (void)_in;
448  Out::ConversionNotImplemented;
449  }
450 
455  template<>
457 
458 
463  template<class Out>
464  Out convert(const sdf::Physics &_in)
465  {
466  (void)_in;
467  Out::ConversionNotImplemented;
468  }
469 
474  template<>
475  msgs::Physics convert(const sdf::Physics &_in);
476 
481  template<class Out>
482  Out convert(const msgs::Physics &_in)
483  {
484  (void)_in;
485  Out::ConversionNotImplemented;
486  }
487 
492  template<>
493  sdf::Physics convert(const msgs::Physics &_in);
494 
495 
500  template<class Out>
501  Out convert(const sdf::Sensor &_in)
502  {
503  (void)_in;
504  Out::ConversionNotImplemented;
505  }
506 
511  template<>
512  msgs::Sensor convert(const sdf::Sensor &_in);
513 
518  template<class Out>
519  Out convert(const msgs::Sensor &_in)
520  {
521  (void)_in;
522  Out::ConversionNotImplemented;
523  }
524 
529  template<>
530  sdf::Sensor convert(const msgs::Sensor &_in);
531 
536  template<class Out>
537  Out convert(const msgs::SensorNoise &_in)
538  {
539  (void)_in;
540  Out::ConversionNotImplemented;
541  }
542 
547  template<>
548  sdf::Noise convert(const msgs::SensorNoise &_in);
549 
555  template<class Out>
557  {
558  (void)_in;
559  Out::ConversionNotImplemented;
560  }
561 
566  template<>
568 
573  template<class Out>
574  Out convert(const UpdateInfo &_in)
575  {
576  (void)_in;
577  Out::ConversionNotImplemented;
578  }
579 
584  template<>
586 
591  template<class Out>
592  Out convert(const sdf::Collision &_in)
593  {
594  (void)_in;
595  Out::ConversionNotImplemented;
596  }
597 
602  template<>
604 
609  template<class Out>
610  Out convert(const msgs::Collision &_in)
611  {
612  (void)_in;
613  Out::ConversionNotImplemented;
614  }
615 
620  template<>
622 
627  template<class Out>
628  Out convert(const std::string &_in)
629  {
630  (void)_in;
631  Out::ConversionNotImplemented;
632  }
633 
637  template<>
639 
644  template<class Out>
646  {
647  (void)_in;
648  Out::ConversionNotImplemented;
649  }
650 
655  template<>
657 
663  template<class Out>
665  {
666  (void)_in;
667  Out::ConversionNotImplemented;
668  }
669 
674  template<>
676 
682  template<class Out>
683  Out convert(const sdf::ParticleEmitter &/*_in*/)
684  {
685  Out::ConversionNotImplemented;
686  }
687 
692  template<>
694 
700  template<class Out>
701  Out convert(const msgs::ParticleEmitter &/*_in*/)
702  {
703  Out::ConversionNotImplemented;
704  }
705 
710  template<>
712  }
713  }
714 }
715 #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:38
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 &_in)
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 sensor.
Definition: Sensor.hh:35