fix setmode in launch and min alt.
This commit is contained in:
parent
4eb044a4a9
commit
835a25c3c5
|
@ -77,7 +77,7 @@ function stop() {
|
||||||
if(V_TYPE == 0 or V_TYPE == 1) { # flying vehicle so LAND
|
if(V_TYPE == 0 or V_TYPE == 1) { # flying vehicle so LAND
|
||||||
neighbors.broadcast("cmd", 21)
|
neighbors.broadcast("cmd", 21)
|
||||||
uav_land()
|
uav_land()
|
||||||
if(pose.position.altitude <= 0.1) {
|
if(pose.position.altitude <= 0.3) {
|
||||||
BVMSTATE = "TURNEDOFF"
|
BVMSTATE = "TURNEDOFF"
|
||||||
#barrier_set(ROBOTS,"TURNEDOFF","STOP", 21)
|
#barrier_set(ROBOTS,"TURNEDOFF","STOP", 21)
|
||||||
#barrier_ready(21)
|
#barrier_ready(21)
|
||||||
|
|
|
@ -9,7 +9,7 @@ include "timesync.bzz"
|
||||||
include "utils/takeoff_heights.bzz"
|
include "utils/takeoff_heights.bzz"
|
||||||
|
|
||||||
#State launched after takeoff
|
#State launched after takeoff
|
||||||
AUTO_LAUNCH_STATE = "TASK_ALLOCATE"
|
AUTO_LAUNCH_STATE = "IDLE"
|
||||||
#AUTO_LAUNCH_STATE = "CUSFUN"
|
#AUTO_LAUNCH_STATE = "CUSFUN"
|
||||||
#Lowest robot id in the network
|
#Lowest robot id in the network
|
||||||
LOWEST_ROBOT_ID = 0
|
LOWEST_ROBOT_ID = 0
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<arg name="script" default="testalone"/>
|
<arg name="script" default="testalone"/>
|
||||||
<arg name="launch_config" default="topics"/>
|
<arg name="launch_config" default="topics"/>
|
||||||
<arg name="debug" default="false" />
|
<arg name="debug" default="false" />
|
||||||
|
<arg name="setmode" default="false" />
|
||||||
|
|
||||||
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
|
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
|
||||||
<rosparam file="$(find rosbuzz)/launch/launch_config/$(arg launch_config).yaml"/>
|
<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="xbee_plugged" value="$(arg xbee_plugged)"/>
|
||||||
<param name="name" value="$(arg name)"/>
|
<param name="name" value="$(arg name)"/>
|
||||||
<param name="xbee_status_srv" value="network_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"/>
|
<param name="stand_by" value="$(find rosbuzz)/buzz_scripts/stand_by.bzz"/>
|
||||||
</node>
|
</node>
|
||||||
</launch>
|
</launch>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<arg name="script" default="testalone"/>
|
<arg name="script" default="testalone"/>
|
||||||
<arg name="launch_config" default="topics"/>
|
<arg name="launch_config" default="topics"/>
|
||||||
<arg name="debug" default="true" />
|
<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">
|
<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"/>
|
<rosparam file="$(find rosbuzz)/launch/launch_config/$(arg launch_config).yaml"/>
|
||||||
|
@ -19,7 +20,8 @@
|
||||||
<param name="out_payload" value="outMavlink"/>
|
<param name="out_payload" value="outMavlink"/>
|
||||||
<param name="xbee_plugged" value="$(arg xbee_plugged)"/>
|
<param name="xbee_plugged" value="$(arg xbee_plugged)"/>
|
||||||
<param name="name" value="$(arg name)"/>
|
<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"/>
|
<param name="stand_by" value="$(find rosbuzz)/buzz_scripts/stand_by.bzz"/>
|
||||||
</node>
|
</node>
|
||||||
</launch>
|
</launch>
|
||||||
|
|
|
@ -755,7 +755,7 @@ script
|
||||||
armstate = 0;
|
armstate = 0;
|
||||||
Arm();
|
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;
|
armstate = 0;
|
||||||
Arm();
|
Arm();
|
||||||
|
|
Loading…
Reference in New Issue