I have just installed MAVROS + MAVROS extra as explained in the README and now i want to send data (distance sensor) obtained by stereo camera from ROS to the FC.
So basically, i made a node which publish a sensorMsg/Range with the same name as defined in apm_config.yaml which is “rangefinder_sub”
Here is the part of apm_config.yaml :
and here is the ROS node whichs send the distance:
self.rangePub = rospy.Publisher("/mavros/distance_sensor/rangefinder_sub", Range, queue_size=20)
self.range_obj = Range()
self.range_obj.header.stamp = rospy.Time.now()
self.range_obj.radiation_type = 0
self.range_obj.field_of_view = 0.1
self.range_obj.min_range = 1.0
self.range_obj.max_range = 5.0
self.range_obj.range = 3.0
rostopic echo /mavros/distance_sensor/rangefinder_sub
i can see that my node is publishing the data so i guess also that MAVROS will subscribe to this topic as defined in the mavros plugin and thus send this sensorMsg/Range message to the FC right?
In my mission planner i am not sure how i can display the distance sensor value receive by the FC (using ctrl+F and click on proximity to open the RADAR window)
Secondly, as it is a custom sensor, what value should i use for the PRX_TYPE parameter in mission planner and especially what are the other parameters i should modify.
If anyone has idea on how to solve this, it would save me!
Thank you in advance.
MAVROS version and platform
Ubuntu: 16.04 (VMWare)
Autopilot type and version