i successfully executed roslaunch local_planner aovidance.launch
but I encountered a problem with the avoidance system not ready on QGC.
May I ask how to solve this?
aovidance.launch is generated automatically
I checked mavros and the point cloud, and they were both normal.
my drone:
jetson nx, d435i depth camera, pixhawk 6c
ubuntu20.04, px4 1.14.3
aovidance.launch:
<!-- Launch MavROS -->
<group ns="$(arg ns)">
<include file="$(find mavros)/launch/node.launch">
<arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" />
<!-- Need to change the config file to get the tf topic and get local position in terms of local origin -->
<arg name="config_yaml" value="$(find avoidance)/resource/px4_config.yaml" />
<arg name="fcu_url" value="$(arg fcu_url)" />
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
</include>
</group>
<!-- Launch cameras -->
<node pkg="tf" type="static_transform_publisher" name="tf_camera_main" required="true"
args="0.1 0 -0.05 0 0 0 fcu camera_main_link 100"/>
<node pkg="tf" type="static_transform_publisher" name="tf_fcu_base_link"
args="0 0 0 0 0 0 fcu base_link 10" />
<include file="$(find local_planner)/launch/rs_depthcloud.launch">
<arg name="required" value="true"/>
<arg name="namespace" value="camera_main" />
<arg name="tf_prefix" value="camera_main" />
<arg name="serial_no" value="033422070106"/>
<arg name="depth_fps" value="30"/>
</include>
<!-- launch node to throttle depth images for logging -->
<node name="drop_camera_main_depth" pkg="topic_tools" type="drop" output="screen"
args="/camera_main/depth/image_rect_raw 29 30">
</node>
<node name="drop_camera_main_ir" pkg="topic_tools" type="drop" output="screen"
args="/camera_main/infra1/image_rect_raw 29 30">
</node>
<node name="dynparam" pkg="dynamic_reconfigure" type="dynparam" args="load local_planner_node /home/amov/Avoidance/catkin_ws/src/PX4-Avoidance/local_planner/cfg/vehicle.yaml" />
<!-- Launch avoidance -->
<env name="ROSCONSOLE_CONFIG_FILE" value="$(find local_planner)/resource/custom_rosconsole.conf"/>
<arg name="pointcloud_topics" default="[/camera_main/depth/points]"/>
<node name="local_planner_node" pkg="local_planner" type="local_planner_node" output="screen" required="true" >
<param name="goal_x_param" value="0" />
<param name="goal_y_param" value="0"/>
<param name="goal_z_param" value="4" />
<rosparam param="pointcloud_topics" subst_value="True">$(arg pointcloud_topics)</rosparam>
</node>
<!-- set or toggle rqt parameters -->
<node name="rqt_param_toggle" pkg="local_planner" type="rqt_param_toggle.sh" />