Closed Seanmatthews closed 5 years ago
The config of the Mavlink DISTANCE_SENSOR msg has to be done on the sitl_gazebo side.
@TSC21 Can you expand? As far as I can tell, the orientation is configured on the sitl_gazebo side and it's not passing through. I added to the typhoon_h480 SDF model a pose for the sonar sensor:
<include> <uri>model://sonar</uri> <pose>0.12 0 0 0 4.71239 0</pose> </include>
Check the gazebo_mavlink_interface
of sitl_gazebo. This is not a MAVROS related topic so should be discussed on the appropriate forums.
After commented “distance sensors” and “range finders” on px4_pluginlists.yaml, I finally can get the distance_sensor rostopic ref: https://discuss.px4.io/t/how-to-read-distance-sensor-data-from-mavros-topic/21944 However, I faced the similar situation, when running roslaunch px4 mavros_posix_sitl.launch
There is the error: DS: hrlv_ez4_pub: received sensor data has different orientation (NONE) than in config (PITCH_270)!
Issue details
It's unclear how to define the sensor orientation as it's coming from Gazebo, such that this error does not occur:
You can reproduce it by running
mavros_posix_sitl.launch
with thetyphoon_h480
vehicle model (defined in sitl_gazebo) that uses the sonar sensor.MAVROS version and platform
Mavros: Kinetic apt repo latest ROS: Kinetic Ubuntu: 16.04
Autopilot type and version
[ ] ArduPilot [ x] PX4
Version: 1.8.2
Node logs
A sample:
Diagnostics
Check ID