Using ADSB to avoid from mavlink/mavros

hey, trying to use the avoid functionality by sending gps/velocitys from another source
was trying to send this via the /mavros/adsb/

rostopic pub -r 1 /mavros/adsb/vehicle mavros_msgs/ADSBVehicle "header:
  seq: 0
  stamp: {secs: 1627396466, nsecs: 0}
  frame_id: ''
ICAO_address: 0
callsign: 'DRONE'
latitude: xx.xxxx
longitude: xx.xxxx
altitude: 30.0
heading: 0.0
hor_velocity: 1.0
ver_velocity: 1.0
altitude_type: 0
emitter_type: 14
tslc: {secs: 2, nsecs: 0}
flags: 447
squawk: 0"

but it just seems to be ignored

im publishing to the adsb topic at 1Hz

the adsb avoid param is set (AVD_ENABLE = 1 and have set the AVD distances (F/W, XY/Z) to 1000 so it should always trigger

The other option was to set DEV_OPTIONS and send a GLOBAL_POSITION_INT but that would mean making a custom mavlink publisher to send the global pos int - so before doing this wondering if im missing something simple publishing to the adsb topic
https://ardupilot.org/copter/docs/parameters.html#dev-options-development-options

any pointers would be much apreciated :slight_smile:

can you capture a tlog showing all the mavlink traffic between your mavros script and the vehicle? That may give us some clues

thanks for the log, I don’t see any ADSB_VEHICLE messages in the log, which I presume your mavros script is trying to send.

if i use the SIM_ADSB and get the output from

i see it published in: rostopic echo /mavros/adsb/vehicle
if i then publish the same data causing the colision to this topic the copter doesnt respond to it.
not sure why this would be the case, will see if it needs to be coming from a diffrent sysid?

i figured it out and now have it working, in mavros i need to use the topic /mavros/adsb/send not /mavros/adsb/vehicle to get the message to the FCU

when i tried this before i must have had a wrong param set