obstacle buzz object

This commit is contained in:
vivek-shankar 2017-02-10 15:57:25 -05:00
parent b5c512142d
commit a98e11aa41
3 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<launch>
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
<param name="bzzfile_name" value="/home/vivek/catkin_ws/src/rosbuzz/src/test1.bzz" />
<param name="bzzfile_name" value="/home/vivek/catkin_ws/src/rosbuzz/src/test_obst.bzz" />
<param name="rcclient" value="true" />
<param name="rcservice_name" value="rc_cmd" />
<param name="fcclient_name" value="/djicmd" />

View File

@ -492,6 +492,7 @@ namespace buzz_utility{
buzzuav_closures::buzzuav_update_prox(VM);
buzzuav_closures::buzzuav_update_currentpos(VM);
buzzuav_closures::buzzuav_update_flight_status(VM);
buzzuav_closures::buzzuav_update_obstacle(VM);
/*
* Call Buzz step() function
*/

View File

@ -12,7 +12,7 @@ namespace buzzuav_closures{
static double goto_pos[3];
static double rc_goto_pos[3];
static float batt[3];
static float obst[5];
static float obst[5]={0,0,0,0,0};
static double cur_pos[3];
static uint8_t status;
static int cur_cmd = 0;
@ -204,7 +204,7 @@ rc_cmd=rc_cmd_in;
void set_obstacle_dist(float dist[]){
for(int i=0; i<5;i++)
dist[i]=obst[i];
obst[i]=dist[i];
}