Skip to content

Commit 6bc2a92

Browse files
committed
Small cleanup of data publishing
1 parent 7c1dea1 commit 6bc2a92

File tree

5 files changed

+8
-28
lines changed

5 files changed

+8
-28
lines changed

applications/maplab-node/include/maplab-node/data-publisher-flow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class DataPublisherFlow {
5050
ros::Publisher pub_velocity_I_;
5151
ros::Publisher pub_imu_acc_bias_;
5252
ros::Publisher pub_imu_gyro_bias_;
53-
ros::Publisher pub_extrinsics_T_C_Bs_;
5453

5554
common::TimeoutCounter map_publisher_timeout_;
5655

applications/maplab-node/include/maplab-node/odometry-estimate.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@
77
#include <maplab-common/macros.h>
88
#include <vio-common/vio-types.h>
99

10+
// TODO(smauq): Fix this up, this is a completely useless duplication
1011
namespace maplab {
1112
struct OdometryEstimate {
1213
MAPLAB_POINTER_TYPEDEFS(OdometryEstimate);
1314
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1415

1516
int64_t timestamp_ns;
1617
vio::ViNodeState vinode;
17-
18-
// Mapping maplab camera index to the estimated camera extrinsics.
19-
AlignedUnorderedMap<size_t, aslam::Transformation>
20-
maplab_camera_index_to_T_C_B;
2118
};
2219
} // namespace maplab
2320
#endif // MAPLAB_NODE_ODOMETRY_ESTIMATE_H_

applications/maplab-node/launch/euroc/ros/euroc-maplab-node-rosparam.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ map_builder_save_point_cloud_maps_as_resources: false
4444
# TF
4545
tf_map_frame: map
4646
tf_mission_frame: mission
47-
tf_imu_frame: imu
4847

4948
# DEBUGGING AND LOGGING
5049
alsologtostderr: true
@@ -53,5 +52,5 @@ v: 1
5352
publish_debug_markers: false
5453
vis_default_namespace: maplab_rviz
5554
export_estimated_poses_to_csv: ""
56-
detection_visualize_keypoints: false
55+
detection_visualize_keypoints: true
5756
feature_tracker_visualize_keypoint_matches: true

applications/maplab-node/launch/euroc/ros/euroc-rovioli-rosparam.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ alsologtostderr: true
4747
colorlogtostderr: true
4848
v: 1
4949
publish_debug_markers: false
50+
rovioli_visualize_map: false
5051
vis_default_namespace: maplab_rviz
5152
export_estimated_poses_to_csv: ""
5253
detection_visualize_keypoints: false

applications/maplab-node/src/data-publisher-flow.cc

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ DEFINE_double(
1212
map_publish_interval_s, 2.0,
1313
"Interval of publishing the visual-inertial map to ROS [seconds].");
1414

15-
DEFINE_bool(
16-
publish_only_on_keyframes, false,
17-
"Publish frames only on keyframes instead of the IMU measurements. This "
18-
"means a lower frequency.");
19-
2015
DEFINE_bool(
2116
publish_debug_markers, true, "Publish debug sphere markers for T_M_B.");
2217

@@ -27,8 +22,7 @@ DEFINE_string(
2722

2823
DEFINE_bool(
2924
visualize_map, true,
30-
"Set to false to disable map visualization. Note: map building needs to be "
31-
"active for the visualization.");
25+
"Set to false to disable map visualization during building.");
3226

3327
#include "maplab-node/vi-map-with-mutex.h"
3428

@@ -62,8 +56,6 @@ void DataPublisherFlow::registerPublishers() {
6256
node_handle_.advertise<geometry_msgs::Vector3Stamped>(kTopicBiasAcc, 1);
6357
pub_imu_gyro_bias_ =
6458
node_handle_.advertise<geometry_msgs::Vector3Stamped>(kTopicBiasGyro, 1);
65-
pub_extrinsics_T_C_Bs_ = node_handle_.advertise<geometry_msgs::PoseArray>(
66-
kCameraExtrinsicTopic, 1);
6759
}
6860

6961
void DataPublisherFlow::attachToMessageFlow(message_flow::MessageFlow* flow) {
@@ -95,17 +87,6 @@ void DataPublisherFlow::attachToMessageFlow(message_flow::MessageFlow* flow) {
9587
[this](const OdometryEstimate::ConstPtr& state) {
9688
CHECK(state != nullptr);
9789
publishOdometryState(state->timestamp_ns, state->vinode);
98-
99-
// Publish estimated camera-extrinsics.
100-
geometry_msgs::PoseArray T_C_Bs_message;
101-
T_C_Bs_message.header.frame_id = FLAGS_tf_imu_frame;
102-
T_C_Bs_message.header.stamp = createRosTimestamp(state->timestamp_ns);
103-
for (const auto& cam_idx_T_C_B : state->maplab_camera_index_to_T_C_B) {
104-
geometry_msgs::Pose T_C_B_message;
105-
tf::poseKindrToMsg(cam_idx_T_C_B.second, &T_C_B_message);
106-
T_C_Bs_message.poses.emplace_back(T_C_B_message);
107-
}
108-
pub_extrinsics_T_C_Bs_.publish(T_C_Bs_message);
10990
});
11091

11192
// CSV export for end-to-end test.
@@ -161,8 +142,11 @@ void DataPublisherFlow::publishOdometryState(
161142
const vi_map::SensorType base_sensor_type =
162143
sensor_manager_.getSensorType(base_sensor_id);
163144
const std::string base_sensor_tf_frame_id =
164-
visualization::convertSensorTypeToTfFrameId(base_sensor_type);
145+
visualization::convertSensorTypeToTfFrameId(base_sensor_type) +
146+
"_0_BASE";
165147

148+
// TODO(smauq): Clean up TF frame naming on publishing,
149+
// while also not conflicting with rovioli
166150
visualization::publishTF(
167151
T_M_B, FLAGS_tf_mission_frame, base_sensor_tf_frame_id, timestamp_ros);
168152

0 commit comments

Comments
 (0)