Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wierd behaviour with obstacle avoidance local planner and mission mode #23538

Open
parapara29 opened this issue Aug 13, 2024 · 0 comments

Comments

@parapara29
Copy link

Describe the bug

The Drone takes off when the mission is passed to the drone, and the command to takeoff is given via the QGC. However, after the drone takes off, it starts to come back to ground and performs motion to reach the waypoint just barely above ground level, even though the waypoint altitude is set to 4 or 5m.

To Reproduce

  • Launch file on the structure core companion computer. avoidance.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_sc" required="true"
   args="0.1 0.0 -0.08 0 0 0 fcu sc_map 1"/>
   
<include file="$(find structure_core_ros_driver)/launch/sc.launch">
</include>

<node name="drop_sc_depth" pkg="topic_tools" type="drop" output="screen"
   args="/sc/depth/image 29 30">
   <remap from="/sc/depth/image_drop" to="/sc/depth/image_rect_raw_drop"/>
</node>

<node name="drop_sc_rgb" pkg="topic_tools" type="drop" output="screen"
   args="/sc/rgb/image 29 30">
</node>

<node name="dynparam" pkg="dynamic_reconfigure" type="dynparam" args="load local_planner_node /home/px4vision/drone_ws/src/avoidance/local_planner/cfg/params_vehicle_1.yaml" />
<!-- Launch avoidance -->
<env name="ROSCONSOLE_CONFIG_FILE" value="$(find local_planner)/resource/custom_rosconsole.conf"/>
<arg name="pointcloud_topics" default="[/sc/rgbd/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" />

`

  • Launch QGC on the host and pass the mission to the drone.
  • Upload the mission.
  • Takeoff.

Expected behavior

The drone takes off, flies to the desired waypoint while avoiding nearby obstacles.

Screenshot / Media

No response

Flight Log

https://logs.px4.io/plot_app?log=fb1865b9-1f26-482c-b2df-3595a47a1c88

Software Version

PX4-FMUv6C

Flight controller

Pixhawk 6c

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant