ign sim fix alt ground truth and baro

This commit is contained in:
Daniel Agar
2022-08-14 15:22:24 -04:00
parent 04ac07f07a
commit 4c3da85b97
2 changed files with 2 additions and 2 deletions
@@ -157,7 +157,7 @@ void IgnitionSimulator::PoseInfoCallback(const ignition::msgs::Pose_V &pose)
_pos_ref.reproject(local_position_groundtruth.x, local_position_groundtruth.y,
global_position_groundtruth.lat, global_position_groundtruth.lon);
global_position_groundtruth.alt = _param_sim_home_alt.get() - static_cast<float>(pose_position.z());
global_position_groundtruth.alt = _param_sim_home_alt.get() - static_cast<float>(position(2));
global_position_groundtruth.timestamp = hrt_absolute_time();
_gpos_ground_truth_pub.publish(global_position_groundtruth);
}