Ignition Gazebo

API Reference

2.10.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/axis.pb.h>
21 #include <ignition/msgs/geometry.pb.h>
22 #include <ignition/msgs/gui.pb.h>
23 #include <ignition/msgs/inertial.pb.h>
24 #include <ignition/msgs/light.pb.h>
25 #include <ignition/msgs/material.pb.h>
26 #include <ignition/msgs/scene.pb.h>
27 #include <ignition/msgs/sensor.pb.h>
28 #include <ignition/msgs/sensor_noise.pb.h>
29 #include <ignition/msgs/time.pb.h>
30 #include <ignition/msgs/world_stats.pb.h>
31 
32 #include <chrono>
33 
36 #include <sdf/Collision.hh>
37 #include <sdf/Geometry.hh>
38 #include <sdf/Gui.hh>
39 #include <sdf/JointAxis.hh>
40 #include <sdf/Light.hh>
41 #include <sdf/Material.hh>
42 #include <sdf/Noise.hh>
43 #include <sdf/Scene.hh>
44 #include <sdf/Sensor.hh>
45 
46 #include "ignition/gazebo/config.hh"
47 #include "ignition/gazebo/Export.hh"
48 #include "ignition/gazebo/Types.hh"
49 
50 namespace ignition
51 {
52  namespace gazebo
53  {
54  // Inline bracket to help doxygen filtering.
55  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
60  void set(msgs::SensorNoise *_msg, const sdf::Noise &_sdf);
61 
66  void set(msgs::WorldStatistics *_msg, const UpdateInfo &_in);
67 
73  void set(msgs::Time *_msg, const std::chrono::steady_clock::duration &_in);
74 
79  template<class Out>
80  Out convert(const sdf::Geometry &/*_in*/)
81  {
82  Out::ConversionNotImplemented;
83  }
84 
89  template<>
91 
96  template<class Out>
97  Out convert(const msgs::Geometry &/*_in*/)
98  {
99  Out::ConversionNotImplemented;
100  }
101 
106  template<>
108 
113  template<class Out>
114  Out convert(const sdf::Material &/*_in*/)
115  {
116  Out::ConversionNotImplemented;
117  }
118 
123  template<>
125 
130  template<class Out>
131  Out convert(const msgs::Material &/*_in*/)
132  {
133  Out::ConversionNotImplemented;
134  }
135 
140  template<>
142 
147  template<class Out>
148  Out convert(const sdf::Light &/*_in*/)
149  {
150  Out::ConversionNotImplemented;
151  }
152 
157  template<>
158  msgs::Light convert(const sdf::Light &_in);
159 
160 
165  template<class Out>
166  Out convert(const msgs::Light& /*_in*/)
167  {
168  Out::ConversionNotImplemented;
169  }
170 
175  template<>
176  sdf::Light convert(const msgs::Light &_in);
177 
182  template<class Out>
183  Out convert(const sdf::Gui &/*_in*/)
184  {
185  Out::ConversionNotImplemented;
186  }
187 
191  template<>
192  msgs::GUI convert(const sdf::Gui &_in);
193 
198  template<class Out>
199  Out convert(const std::chrono::steady_clock::duration &/*_in*/)
200  {
201  Out::ConversionNotImplemented;
202  }
203 
208  template<>
209  msgs::Time convert(const std::chrono::steady_clock::duration &_in);
210 
215  template<class Out>
216  Out convert(const msgs::Time &/*_in*/)
217  {
218  Out::ConversionNotImplemented;
219  }
220 
225  template<>
226  std::chrono::steady_clock::duration convert(const msgs::Time &_in);
227 
232  template<class Out>
233  Out convert(const math::Inertiald &/*_in*/)
234  {
235  Out::ConversionNotImplemented;
236  }
237 
242  template<>
244 
249  template<class Out>
250  Out convert(const msgs::Inertial &/*_in*/)
251  {
252  Out::ConversionNotImplemented;
253  }
254 
259  template<>
261 
266  template<class Out>
267  Out convert(const sdf::JointAxis &/*_in*/)
268  {
269  Out::ConversionNotImplemented;
270  }
271 
276  template<>
277  msgs::Axis convert(const sdf::JointAxis &_in);
278 
283  template<class Out>
284  Out convert(const msgs::Axis &/*_in*/)
285  {
286  Out::ConversionNotImplemented;
287  }
288 
293  template<>
294  sdf::JointAxis convert(const msgs::Axis &_in);
295 
300  template<class Out>
301  Out convert(const sdf::Scene &/*_in*/)
302  {
303  Out::ConversionNotImplemented;
304  }
305 
309  template<>
310  msgs::Scene convert(const sdf::Scene &_in);
311 
316  template<class Out>
317  Out convert(const msgs::Scene &/*_in*/)
318  {
319  Out::ConversionNotImplemented;
320  }
321 
326  template<>
327  sdf::Scene convert(const msgs::Scene &_in);
328 
333  template<class Out>
334  Out convert(const sdf::Sensor &/*_in*/)
335  {
336  Out::ConversionNotImplemented;
337  }
338 
343  template<>
344  msgs::Sensor convert(const sdf::Sensor &_in);
345 
350  template<class Out>
351  Out convert(const msgs::Sensor &/*_in*/)
352  {
353  Out::ConversionNotImplemented;
354  }
355 
360  template<>
361  sdf::Sensor convert(const msgs::Sensor &_in);
362 
367  template<class Out>
368  Out convert(const msgs::SensorNoise &/*_in*/)
369  {
370  Out::ConversionNotImplemented;
371  }
372 
377  template<>
378  sdf::Noise convert(const msgs::SensorNoise &_in);
379 
385  template<class Out>
386  Out convert(const msgs::WorldStatistics &/*_in*/)
387  {
388  Out::ConversionNotImplemented;
389  }
390 
395  template<>
396  UpdateInfo convert(const msgs::WorldStatistics &_in);
397 
402  template<class Out>
403  Out convert(const UpdateInfo &/*_in*/)
404  {
405  Out::ConversionNotImplemented;
406  }
407 
412  template<>
413  msgs::WorldStatistics convert(const UpdateInfo &_in);
414 
419  template<class Out>
420  Out convert(const sdf::Collision &/*_in*/)
421  {
422  Out::ConversionNotImplemented;
423  }
424 
429  template<>
431 
436  template<class Out>
437  Out convert(const msgs::Collision &/*_in*/)
438  {
439  Out::ConversionNotImplemented;
440  }
441 
446  template<>
448  }
449  }
450 }
451 #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< math::Inertiald, class InertialTag, serializers::InertialSerializer > Inertial
This component holds an entity&#39;s inertial.
Definition: Inertial.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
Out convert(const sdf::Geometry &)
Generic conversion from an SDF geometry to another type.
Definition: Conversions.hh:80
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
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:33