NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
utilities.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef LOCALIZATION_RVIZ_PLUGINS_UTILITIES_H_ // NOLINT
20 #define LOCALIZATION_RVIZ_PLUGINS_UTILITIES_H_ // NOLINT
21 
26 
27 #include <gtsam/geometry/Pose3.h>
28 #include <gtsam/navigation/CombinedImuFactor.h>
29 
30 #include <rviz/display_context.h>
31 #include <rviz/ogre_helpers/axes.h>
32 
33 #include <OgreQuaternion.h>
34 #include <OgreVector3.h>
35 
36 #include <memory>
37 #include <utility>
38 #include <string>
39 #include <vector>
40 
41 namespace localization_rviz_plugins {
42 Ogre::Vector3 ogrePosition(const gtsam::Pose3& pose);
43 
44 Ogre::Vector3 ogrePosition(const gtsam::Point3& point);
45 
46 Ogre::Quaternion ogreQuaternion(const gtsam::Pose3& pose);
47 
48 boost::optional<gtsam::Pose3> currentFrameTFrame(const std::string& frame_id, const ros::Time timestamp,
49  const rviz::DisplayContext& context);
50 
51 std::unique_ptr<rviz::Axes> axisFromPose(const gtsam::Pose3& pose, const double scale,
52  Ogre::SceneManager* scene_manager, Ogre::SceneNode* scene_node);
53 
54 boost::optional<localization_common::CombinedNavState> firstCombinedNavState(
55  const graph_localizer::GraphLocalizer& graph_localizer, const gtsam::CombinedImuFactor* const imu_factor);
56 
57 boost::optional<localization_common::CombinedNavState> pimPredict(
58  const graph_localizer::GraphLocalizer& graph_localizer, const gtsam::CombinedImuFactor* const imu_factor);
59 
60 std::pair<Ogre::Quaternion, double> getOrientationAndLength(const gtsam::Point3& point_a, const gtsam::Point3& point_b);
61 } // namespace localization_rviz_plugins
62 #endif // LOCALIZATION_RVIZ_PLUGINS_UTILITIES_H_ NOLINT
localization_rviz_plugins::currentFrameTFrame
boost::optional< gtsam::Pose3 > currentFrameTFrame(const std::string &frame_id, const ros::Time timestamp, const rviz::DisplayContext &context)
Definition: utilities.cc:38
utilities.h
graph_localizer.h
graph_localizer::GraphLocalizer
Definition: graph_localizer.h:37
localization_rviz_plugins::pimPredict
boost::optional< lc::CombinedNavState > pimPredict(const graph_localizer::GraphLocalizer &graph_localizer, const gtsam::CombinedImuFactor *const imu_factor)
Definition: utilities.cc:84
time.h
localization_rviz_plugins::firstCombinedNavState
boost::optional< lc::CombinedNavState > firstCombinedNavState(const graph_localizer::GraphLocalizer &graph_localizer, const gtsam::CombinedImuFactor *const imu_factor)
Definition: utilities.cc:59
localization_rviz_plugins::ogrePosition
Ogre::Vector3 ogrePosition(const gtsam::Pose3 &pose)
Definition: utilities.cc:27
localization_rviz_plugins::axisFromPose
std::unique_ptr< rviz::Axes > axisFromPose(const gtsam::Pose3 &pose, const double scale, Ogre::SceneManager *scene_manager, Ogre::SceneNode *scene_node)
Definition: utilities.cc:50
combined_nav_state.h
localization_rviz_plugins::getOrientationAndLength
std::pair< Ogre::Quaternion, double > getOrientationAndLength(const gtsam::Point3 &point_a, const gtsam::Point3 &point_b)
Definition: utilities.cc:92
localization_rviz_plugins::ogreQuaternion
Ogre::Quaternion ogreQuaternion(const gtsam::Pose3 &pose)
Definition: utilities.cc:33
localization_rviz_plugins
Definition: depth_odometry_display.cc:42
graph_localizer
Definition: graph_localizer.h:32
localization_common::Time
double Time
Definition: time.h:23