Closed siddharthcb closed 3 years ago
Are you sure that you are publishing to /mavros/obstacle/send
?
Because log message comes from distance_sensor
, which requires to configure a mapping.
@vooon I am publishing to /mavros/obstacle/send
I can even visualize it in proximity and I can see obstacle_distance in mavlink inspector.
Here is my node.launch file
<launch>
<!-- vim: set ft=xml noet : -->
<!-- base node launch file-->
<arg name="fcu_url" />
<arg name="gcs_url" />
<arg name="tgt_system" />
<arg name="tgt_component" />
<arg name="pluginlists_yaml" />
<arg name="config_yaml" />
<arg name="log_output" default="screen" />
<arg name="fcu_protocol" default="v2.0" />
<arg name="respawn_mavros" default="false" />
<node pkg="mavros" type="mavros_node" name="mavros" required="$(eval not respawn_mavros)" clear_params="true" output="$(arg log_output)" respawn="$(arg respawn_mavros)">
<param name="fcu_url" value="$(arg fcu_url)" />
<param name="gcs_url" value="$(arg gcs_url)" />
<param name="target_system_id" value="$(arg tgt_system)" />
<param name="target_component_id" value="$(arg tgt_component)" />
<param name="fcu_protocol" value="$(arg fcu_protocol)" />
<!-- load blacklist, config -->
<rosparam command="load" file="$(arg pluginlists_yaml)" />
<rosparam command="load" file="$(arg config_yaml)" />
<!-- remap from="/mavros/setpoint_velocity/cmd_vel_unstamped" to="/cmd_vel" /-->
<remap from="/mavros/vision_pose/pose" to="/robot_pose" />
<remap from="/mavros/obstacle/send" to="/revised_scan" />
</node>
</launch>
log messages comes from distance_sensor directly
so i do not have to configure obstacle_distance separately in the apm_config.yaml file? and what are rangefinder_pub and rangefinder_sub topics? From where is it being published?
@vooon is there a necessity to change apm_pluginlist.yaml? my apm_pluginlist.yaml looks like this:
plugin_blacklist:
# common
- actuator_control
- ftp
- safety_area
- hil
# extras
- altitude
- debug_value
- image_pub
- px4flow
- vibration
- vision_speed_estimate
- wheel_odometry
plugin_whitelist: []
#- 'sys_*'
UPDATE: when i added "distance_sensor" to apm_pluginlist.yaml(under plugin_blacklist), the error disappeared and I can still see the laser data in APMs "proximity" and "obstacle_distance" plugin in mavlink inspector BUT IS THIS THE CORRECT WAY?
It seems that APM sends back DISTANCE_SENSOR messages when you're using OBSTACLE_DISTANCE. Excluding plugin from loading should be fine.
@voon Thank you
Hi, I have added an obstacle_distance plugin in mavros and have written an extra script to accommodate 72 laser points. when i run roslaunch mavros
($ roslaunch mavros apm.launch fcu_url:=/dev/ttyUSB1:921600)
without running this extra script everything works fine but when i run this extra script for laser. i get this error on the terminalROS: melodic Ubuntu: 18.04 APM software
as @TSC21 mentioned in this thread, i am supposed to change the config in apm_config.yaml, though i have added config for obstacle_distance in this file i am still finding the same error. my apm_config.yaml looks like this: