@@ -21,6 +21,7 @@ void declare_config(GtRoomPublisher::Config& config) {
2121 using namespace config ;
2222 name (" GtRoomPublisher::Config" );
2323 field (config.ns , " ns" );
24+ field (config.room_frame_id , " room_frame_id" );
2425 field (config.colormap , " colormap" );
2526}
2627
@@ -35,7 +36,6 @@ GtRoomPublisher::GtRoomPublisher(const Config& config)
3536std::string GtRoomPublisher::printInfo () const { return config::toString (config); }
3637
3738void GtRoomPublisher::call (uint64_t , const RoomFinder& rf) const {
38- LOG (WARNING ) << " GT Room sink called" ;
3939 MarkerArray ma;
4040 auto & m = ma.markers .emplace_back ();
4141 m.action = m.DELETEALL ;
@@ -47,12 +47,17 @@ void GtRoomPublisher::call(uint64_t, const RoomFinder& rf) const {
4747 for (auto room : rf.room_extents .room_bounding_boxes ) {
4848 for (auto box : room) {
4949 auto & m = ma.markers .emplace_back ();
50- m.header .frame_id = " map " ;
50+ m.header .frame_id = config. room_frame_id ;
5151 m.ns = " gt_rooms" ;
5252 m.id = idx++;
5353 m.action = m.ADD ;
5454 m.type = m.CUBE ;
55- m.pose .orientation .w = 1 ;
55+
56+ Eigen::Quaternionf q (box.world_R_center );
57+ m.pose .orientation .x = q.x ();
58+ m.pose .orientation .y = q.y ();
59+ m.pose .orientation .z = q.z ();
60+ m.pose .orientation .w = q.w ();
5661 m.pose .position .x = box.world_P_center .x ();
5762 m.pose .position .y = box.world_P_center .y ();
5863 m.pose .position .z = box.world_P_center .z ();
0 commit comments