Revert "Update GZBridge to be able to use gazebo airspeed. Add quadtailsitter. (#23455)" (#23583)

This reverts commit 7e45f49152.

Co-authored-by: jmackay2 <1.732mackay@gmail.com>
This commit is contained in:
Jaeyoung Lim
2024-08-20 19:36:08 -04:00
committed by GitHub
co-authored by jmackay2
parent 0931179579
commit f252e20eae
7 changed files with 16 additions and 103 deletions
+10 -6
View File
@@ -203,15 +203,17 @@ int GZBridge::init()
PX4_WARN("failed to subscribe to %s", laser_scan_topic.c_str());
}
// Airspeed: /world/$WORLD/model/$MODEL/link/base_link/sensor/airspeed_sensor/air_speed
std::string airspeed_topic = "/world/" + _world_name + "/model/" + _model_name +
"/link/base_link/sensor/airspeed_sensor/air_speed";
#if 0
// Airspeed: /world/$WORLD/model/$MODEL/link/airspeed_link/sensor/air_speed/air_speed
std::string airpressure_topic = "/world/" + _world_name + "/model/" + _model_name +
"/link/airspeed_link/sensor/air_speed/air_speed";
if (!_node.Subscribe(airspeed_topic, &GZBridge::airspeedCallback, this)) {
PX4_ERR("failed to subscribe to %s", airspeed_topic.c_str());
if (!_node.Subscribe(airpressure_topic, &GZBridge::airspeedCallback, this)) {
PX4_ERR("failed to subscribe to %s", airpressure_topic.c_str());
return PX4_ERROR;
}
#endif
// Air pressure: /world/$WORLD/model/$MODEL/link/base_link/sensor/air_pressure_sensor/air_pressure
std::string air_pressure_topic = "/world/" + _world_name + "/model/" + _model_name +
"/link/base_link/sensor/air_pressure_sensor/air_pressure";
@@ -424,7 +426,8 @@ void GZBridge::barometerCallback(const gz::msgs::FluidPressure &air_pressure)
pthread_mutex_unlock(&_node_mutex);
}
void GZBridge::airspeedCallback(const gz::msgs::AirSpeed &air_speed)
#if 0
void GZBridge::airspeedCallback(const gz::msgs::AirSpeedSensor &air_speed)
{
if (hrt_absolute_time() == 0) {
return;
@@ -449,6 +452,7 @@ void GZBridge::airspeedCallback(const gz::msgs::AirSpeed &air_speed)
pthread_mutex_unlock(&_node_mutex);
}
#endif
void GZBridge::imuCallback(const gz::msgs::IMU &imu)
{