Mavros: Plugin distance_sensor loaded but Topic Not found!

Created on 2 Mar 2017  ·  12Comments  ·  Source: mavlink/mavros

Hi..
rostopic list
not found topic with name "distance_sensor" ??

i removed that from this list (apm_pluginlists.yaml):

plugin_blacklist:
.# common
..
.# extras
...
distance_sensor
...

APM question

Most helpful comment

distance_sensor is now full implemented on ardupilot side for sensor output and as input

All 12 comments

That plugin require configuration like that: https://github.com/mavlink/mavros/blob/master/mavros/launch/px4_config.yaml#L116
But APM do not support DISTANCE_SENSOR message anyway.

I checked this (ardupilot-Copter-3.4.5 - GCS_Mavlink.cpp):
void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg)
{
...
case MAVLINK_MSG_ID_DISTANCE_SENSOR:
{
result = MAV_RESULT_ACCEPTED;
copter.rangefinder.handle_msg(msg);
break;
}
..
}
and ( ardupilot-Copter-3.4.5 - AP_RangeFInder_Mavlink.cpp):
void AP_RangeFinder_MAVLink::handle_msg(mavlink_message_t *msg)
{
mavlink_distance_sensor_t packet;
mavlink_msg_distance_sensor_decode(msg, &packet);

last_update_ms = AP_HAL::millis();
distance_cm = packet.current_distance;

}
//
last line show APM can set distance_cm from DISTANCE_SENSOR message!

what mean DS: plugin not configured!
I check mavros with PX4 stack too, but this warning Remained.

Ok, looks like APM now implemented that. Update to master, it added config in #670.

that's work.. but parameter for select pub or sub do not work well.

@Ahrovan any updates? Did you check the px4_config.yaml for how it works?

No, just i checked apm_pluginlists.yaml

Apply the configs the same way as you find on px4_config. See if you want to publish the data comming from the FCU or you want to subscribe data coming from a sensor on your computer and send it to the FCU.

@Ahrovan updates?

Closing as staled. @MasterRos please reopen if you still have problems.

distance_sensor is now full implemented on ardupilot side for sensor output and as input

distance_sensor is now full implemented on ardupilot side for sensor output and as input

Thanks for confirming @khancyr.

Was this page helpful?
0 / 5 - 0 ratings