fix(simulation): fix macOS gz SITL build

Add the GStreamer pkg-config library directories so the Gazebo camera plugin links cleanly with Homebrew installs on macOS. Cast ESC actuator outputs to double before publishing rotor velocities to avoid clang's -Wdouble-promotion build failure.

Signed-off-by: Dima Timofeev <dimkat@gmail.com>
This commit is contained in:
Dima Timofeev
2026-04-19 12:33:03 -07:00
committed by Ramon Roche
parent 67cb65f237
commit 059da2fcf7
2 changed files with 6 additions and 1 deletions
@@ -80,7 +80,7 @@ bool GZMixingInterfaceESC::updateOutputs(float outputs[MAX_ACTUATORS], unsigned
rotor_velocity_message.mutable_velocity()->Resize(active_output_count, 0);
for (unsigned i = 0; i < active_output_count; i++) {
rotor_velocity_message.set_velocity(i, outputs[i]);
rotor_velocity_message.set_velocity(i, static_cast<double>(outputs[i]));
}
if (_actuators_pub.Valid()) {
@@ -45,6 +45,11 @@ else()
GstCameraSystem.cpp
)
target_link_directories(${PROJECT_NAME}
PUBLIC ${GSTREAMER_LIBRARY_DIRS}
PUBLIC ${GSTREAMER_APP_LIBRARY_DIRS}
)
target_link_libraries(${PROJECT_NAME}
PUBLIC px4_gz_msgs
PUBLIC ${GZ_SENSORS_TARGET}