Ignition Gazebo

API Reference

3.0.0
Util.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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_UTIL_HH_
18 #define IGNITION_GAZEBO_UTIL_HH_
19 
20 #include <string>
21 
22 #include <ignition/math/Pose3.hh>
23 #include "ignition/gazebo/config.hh"
26 #include "ignition/gazebo/Export.hh"
27 #include "ignition/gazebo/Types.hh"
28 
29 namespace ignition
30 {
31  namespace gazebo
32  {
33  // Inline bracket to help doxygen filtering.
34  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
35  //
40  math::Pose3d IGNITION_GAZEBO_VISIBLE worldPose(const Entity &_entity,
41  const EntityComponentManager &_ecm);
42 
49  std::string IGNITION_GAZEBO_VISIBLE scopedName(const Entity &_entity,
50  const EntityComponentManager &_ecm, const std::string &_delim = "/",
51  bool _includePrefix = true);
52 
58  std::string IGNITION_GAZEBO_VISIBLE removeParentScope(
59  const std::string &_name, const std::string &_delim);
60 
70  const std::string &_filePath);
71  }
72  }
73 }
74 #endif
std::string removeParentScope(const std::string &_name, const std::string &_delim)
Helper function to remove a parent scope from a given name. This removes the first name found before ...
std::string asFullPath(const std::string &_uri, const std::string &_filePath)
Combine a URI and a file path into a full path. If the URI is already a full path or contains a schem...
STL class.
Pose3< double > Pose3d
std::string scopedName(const Entity &_entity, const EntityComponentManager &_ecm, const std::string &_delim="/", bool _includePrefix=true)
Helper function to generate scoped name for an entity.
math::Pose3d worldPose(const Entity &_entity, const EntityComponentManager &_ecm)
Helper function to compute world pose of an entity.
This library is part of the Ignition Robotics project.
uint64_t Entity
An Entity identifies a single object in simulation such as a model, link, or light. At its core, an Entity is just an identifier.
Definition: Entity.hh:59