Helper class that will publish results onto the ROS framework. More...
#include <ROS1Visualizer.h>
Public Member Functions | |
void | callback_inertial (const sensor_msgs::Imu::ConstPtr &msg) |
Callback for inertial information. More... | |
void | callback_monocular (const sensor_msgs::ImageConstPtr &msg0, int cam_id0) |
Callback for monocular cameras information. More... | |
void | callback_stereo (const sensor_msgs::ImageConstPtr &msg0, const sensor_msgs::ImageConstPtr &msg1, int cam_id0, int cam_id1) |
Callback for synchronized stereo camera information. More... | |
ROS1Visualizer (std::shared_ptr< ros::NodeHandle > nh, std::shared_ptr< VioManager > app, std::shared_ptr< Simulator > sim=nullptr) | |
Default constructor. More... | |
void | setup_subscribers (std::shared_ptr< ov_core::YamlParser > parser) |
Will setup ROS subscribers and callbacks. More... | |
void | visualize () |
Will visualize the system if we have new things. More... | |
void | visualize_final () |
After the run has ended, print results. More... | |
void | visualize_odometry (double timestamp) |
Will publish our odometry message for the current timestep. This will take the current state estimate and get the propagated pose to the desired time. This can be used to get pose estimates on systems which require high frequency pose estimates. More... | |
Protected Types | |
typedef message_filters::sync_policies::ApproximateTime< sensor_msgs::Image, sensor_msgs::Image > | sync_pol |
Protected Member Functions | |
void | publish_features () |
Publish current features. More... | |
void | publish_groundtruth () |
Publish groundtruth (if we have it) More... | |
void | publish_images () |
Publish the active tracking image. More... | |
void | publish_loopclosure_information () |
Publish loop-closure information of current pose and active track information. More... | |
void | publish_state () |
Publish the current state. More... | |
Helper class that will publish results onto the ROS framework.
Also save to file the current total state and covariance along with the groundtruth if we are simulating. We visualize the following things:
Definition at line 74 of file ROS1Visualizer.h.
|
protected |
Definition at line 152 of file ROS1Visualizer.h.
ROS1Visualizer::ROS1Visualizer | ( | std::shared_ptr< ros::NodeHandle > | nh, |
std::shared_ptr< VioManager > | app, | ||
std::shared_ptr< Simulator > | sim = nullptr |
||
) |
Default constructor.
nh | ROS node handler |
app | Core estimator manager |
sim | Simulator if we are simulating |
Definition at line 38 of file ROS1Visualizer.cpp.
void ROS1Visualizer::callback_inertial | ( | const sensor_msgs::Imu::ConstPtr & | msg | ) |
Callback for inertial information.
Definition at line 438 of file ROS1Visualizer.cpp.
void ROS1Visualizer::callback_monocular | ( | const sensor_msgs::ImageConstPtr & | msg0, |
int | cam_id0 | ||
) |
Callback for monocular cameras information.
Definition at line 498 of file ROS1Visualizer.cpp.
void ROS1Visualizer::callback_stereo | ( | const sensor_msgs::ImageConstPtr & | msg0, |
const sensor_msgs::ImageConstPtr & | msg1, | ||
int | cam_id0, | ||
int | cam_id1 | ||
) |
Callback for synchronized stereo camera information.
Definition at line 537 of file ROS1Visualizer.cpp.
|
protected |
Publish current features.
Definition at line 679 of file ROS1Visualizer.cpp.
|
protected |
Publish groundtruth (if we have it)
Definition at line 711 of file ROS1Visualizer.cpp.
|
protected |
Publish the active tracking image.
Definition at line 651 of file ROS1Visualizer.cpp.
|
protected |
Publish loop-closure information of current pose and active track information.
Definition at line 840 of file ROS1Visualizer.cpp.
|
protected |
Publish the current state.
Definition at line 591 of file ROS1Visualizer.cpp.
void ROS1Visualizer::setup_subscribers | ( | std::shared_ptr< ov_core::YamlParser > | parser | ) |
Will setup ROS subscribers and callbacks.
parser | Configuration file parser |
Definition at line 151 of file ROS1Visualizer.cpp.
void ROS1Visualizer::visualize | ( | ) |
Will visualize the system if we have new things.
Definition at line 197 of file ROS1Visualizer.cpp.
void ROS1Visualizer::visualize_final | ( | ) |
After the run has ended, print results.
Definition at line 352 of file ROS1Visualizer.cpp.
void ROS1Visualizer::visualize_odometry | ( | double | timestamp | ) |
Will publish our odometry message for the current timestep. This will take the current state estimate and get the propagated pose to the desired time. This can be used to get pose estimates on systems which require high frequency pose estimates.
Definition at line 245 of file ROS1Visualizer.cpp.
|
protected |
Core application of the filter system.
Definition at line 137 of file ROS1Visualizer.h.
|
protected |
Global node handler.
Definition at line 134 of file ROS1Visualizer.h.
|
protected |
Simulator (is nullptr if we are not sim'ing)
Definition at line 140 of file ROS1Visualizer.h.
|
protected |
Definition at line 183 of file ROS1Visualizer.h.
|
protected |
Queue up camera measurements sorted by time and trigger once we have exactly one IMU measurement with timestamp newer than the camera measurement This also handles out-of-order camera measurements, which is rare, but a nice feature to have for general robustness to bad camera drivers.
Definition at line 179 of file ROS1Visualizer.h.
|
protected |
Definition at line 180 of file ROS1Visualizer.h.
|
protected |
Definition at line 190 of file ROS1Visualizer.h.
|
protected |
Definition at line 143 of file ROS1Visualizer.h.
|
protected |
Definition at line 143 of file ROS1Visualizer.h.
|
protected |
Definition at line 143 of file ROS1Visualizer.h.
|
protected |
Definition at line 186 of file ROS1Visualizer.h.
|
protected |
Definition at line 187 of file ROS1Visualizer.h.
|
protected |
Definition at line 147 of file ROS1Visualizer.h.
|
protected |
Definition at line 200 of file ROS1Visualizer.h.
|
protected |
Definition at line 200 of file ROS1Visualizer.h.
|
protected |
Definition at line 200 of file ROS1Visualizer.h.
|
protected |
Definition at line 194 of file ROS1Visualizer.h.
|
protected |
Definition at line 158 of file ROS1Visualizer.h.
|
protected |
Definition at line 193 of file ROS1Visualizer.h.
|
protected |
Definition at line 157 of file ROS1Visualizer.h.
|
protected |
Definition at line 146 of file ROS1Visualizer.h.
|
protected |
Definition at line 146 of file ROS1Visualizer.h.
|
protected |
Definition at line 146 of file ROS1Visualizer.h.
|
protected |
Definition at line 146 of file ROS1Visualizer.h.
|
protected |
Definition at line 144 of file ROS1Visualizer.h.
|
protected |
Definition at line 161 of file ROS1Visualizer.h.
|
protected |
Definition at line 144 of file ROS1Visualizer.h.
|
protected |
Definition at line 145 of file ROS1Visualizer.h.
|
protected |
Definition at line 145 of file ROS1Visualizer.h.
|
protected |
Definition at line 145 of file ROS1Visualizer.h.
|
protected |
Definition at line 145 of file ROS1Visualizer.h.
|
protected |
Definition at line 161 of file ROS1Visualizer.h.
|
protected |
Definition at line 144 of file ROS1Visualizer.h.
|
protected |
Definition at line 196 of file ROS1Visualizer.h.
|
protected |
Definition at line 195 of file ROS1Visualizer.h.
|
protected |
Definition at line 170 of file ROS1Visualizer.h.
|
protected |
Definition at line 170 of file ROS1Visualizer.h.
|
protected |
Definition at line 199 of file ROS1Visualizer.h.
|
protected |
Definition at line 169 of file ROS1Visualizer.h.
|
protected |
Definition at line 150 of file ROS1Visualizer.h.
|
protected |
Definition at line 151 of file ROS1Visualizer.h.
|
protected |
Definition at line 162 of file ROS1Visualizer.h.
|
protected |
Definition at line 163 of file ROS1Visualizer.h.
|
protected |
Definition at line 164 of file ROS1Visualizer.h.
|
protected |
Definition at line 165 of file ROS1Visualizer.h.
|
protected |
Definition at line 166 of file ROS1Visualizer.h.
|
protected |
Definition at line 153 of file ROS1Visualizer.h.
|
protected |
Definition at line 154 of file ROS1Visualizer.h.
|
protected |
Definition at line 173 of file ROS1Visualizer.h.