fix setmode in launch and min alt.

This commit is contained in:
dave 2018-09-23 23:00:52 -04:00
parent 4eb044a4a9
commit 835a25c3c5
5 changed files with 8 additions and 4 deletions

View File

@ -77,7 +77,7 @@ function stop() {
if(V_TYPE == 0 or V_TYPE == 1) { # flying vehicle so LAND
neighbors.broadcast("cmd", 21)
uav_land()
if(pose.position.altitude <= 0.1) {
if(pose.position.altitude <= 0.3) {
BVMSTATE = "TURNEDOFF"
#barrier_set(ROBOTS,"TURNEDOFF","STOP", 21)
#barrier_ready(21)

View File

@ -9,7 +9,7 @@ include "timesync.bzz"
include "utils/takeoff_heights.bzz"
#State launched after takeoff
AUTO_LAUNCH_STATE = "TASK_ALLOCATE"
AUTO_LAUNCH_STATE = "IDLE"
#AUTO_LAUNCH_STATE = "CUSFUN"
#Lowest robot id in the network
LOWEST_ROBOT_ID = 0

View File

@ -8,6 +8,7 @@
<arg name="script" default="testalone"/>
<arg name="launch_config" default="topics"/>
<arg name="debug" default="false" />
<arg name="setmode" default="false" />
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
<rosparam file="$(find rosbuzz)/launch/launch_config/$(arg launch_config).yaml"/>
@ -20,6 +21,7 @@
<param name="xbee_plugged" value="$(arg xbee_plugged)"/>
<param name="name" value="$(arg name)"/>
<param name="xbee_status_srv" value="network_status"/>
<param name="setmode" value="$(arg setmode)"/>
<param name="stand_by" value="$(find rosbuzz)/buzz_scripts/stand_by.bzz"/>
</node>
</launch>

View File

@ -8,6 +8,7 @@
<arg name="script" default="testalone"/>
<arg name="launch_config" default="topics"/>
<arg name="debug" default="true" />
<arg name="setmode" default="false" />
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" launch-prefix="gdb -ex run --args">
<rosparam file="$(find rosbuzz)/launch/launch_config/$(arg launch_config).yaml"/>
@ -19,7 +20,8 @@
<param name="out_payload" value="outMavlink"/>
<param name="xbee_plugged" value="$(arg xbee_plugged)"/>
<param name="name" value="$(arg name)"/>
<param name="xbee_status_srv" value="xbee_status"/>
<param name="xbee_status_srv" value="network_status"/>
<param name="setmode" value="$(arg setmode)"/>
<param name="stand_by" value="$(find rosbuzz)/buzz_scripts/stand_by.bzz"/>
</node>
</launch>

View File

@ -755,7 +755,7 @@ script
armstate = 0;
Arm();
}
else if(cur_pos.altitude < 0.1) //disarm only when close to ground
else if(cur_pos.altitude < 0.3) //disarm only when close to ground
{
armstate = 0;
Arm();