File tree Expand file tree Collapse file tree 2 files changed +42
-5
lines changed
Expand file tree Collapse file tree 2 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,32 @@ class MagCalStatusPlugin : public plugin::Plugin
104104 }
105105 if (calibration_show[mr.compass_id ]) {
106106 auto mcr = mavros_msgs::msg::MagnetometerReporter ();
107-
108107 mcr.header .stamp = node->now ();
109108 mcr.header .frame_id = std::to_string (mr.compass_id );
109+
110110 mcr.report = mr.cal_status ;
111111 mcr.confidence = mr.orientation_confidence ;
112-
113- mcr_pub->publish (mcr);
114- calibration_show[mr.compass_id ] = false ;
112+ mcr.compass_id = mr.compass_id ;
113+ mcr.cal_mask = mr.cal_mask ;
114+ mcr.cal_status = mr.cal_status ;
115+ mcr.autosaved = mr.autosaved ;
116+ mcr.fitness = mr.fitness ;
117+ mcr.ofs_x = mr.ofs_x ;
118+ mcr.ofs_y = mr.ofs_y ;
119+ mcr.ofs_z = mr.ofs_z ;
120+ mcr.diag_x = mr.diag_x ;
121+ mcr.diag_y = mr.diag_y ;
122+ mcr.diag_z = mr.diag_z ;
123+ mcr.offdiag_x = mr.offdiag_x ;
124+ mcr.offdiag_y = mr.offdiag_y ;
125+ mcr.offdiag_z = mr.offdiag_z ;
126+ mcr.orientation_confidence = mr.orientation_confidence ;
127+ mcr.old_orientation = mr.old_orientation ;
128+ mcr.new_orientation = mr.new_orientation ;
129+ mcr.scale_factor = mr.scale_factor ;
130+
131+ mcr_pub->publish (mcr);
132+ calibration_show[mr.compass_id ] = false ;
115133 }
116134 }
117135};
Original file line number Diff line number Diff line change 11std_msgs/Header header
22
33uint8 report
4- float32 confidence
4+ float32 confidence
5+ uint8 compass_id
6+ uint8 cal_mask
7+ uint8 cal_status
8+ uint8 autosaved
9+ float32 fitness
10+ float32 ofs_x
11+ float32 ofs_y
12+ float32 ofs_z
13+ float32 diag_x
14+ float32 diag_y
15+ float32 diag_z
16+ float32 offdiag_x
17+ float32 offdiag_y
18+ float32 offdiag_z
19+ float32 orientation_confidence
20+ uint8 old_orientation
21+ uint8 new_orientation
22+ float32 scale_factor
23+
You can’t perform that action at this time.
0 commit comments