topic changes

This commit is contained in:
David St-Onge 2016-11-14 17:51:32 -05:00
parent 524263ecc7
commit 863546477f
6 changed files with 54 additions and 20 deletions

View File

@ -2,10 +2,10 @@
<launch>
<node name="rosbuzz_node" pkg="rosbuzz" type="rosbuzz_node" respawn="false" output="screen" >
<param name="bzzfile_name" value="../catkin_ws/src/rosbuzz/src/test.bzz" />
<param name="bzzfile_name" value="../ROS_WS/src/ROSBuzz/src/test.bzz" />
<param name="rcclient" value="true" />
<param name="rcservice_name" value="rc_cmd" />
<param name="fcclient_name" value="fc_cmd" />
<param name="fcclient_name" value="djicmd" />
</node>
<param name="robot_id" value="1"/>
</launch>

49
src/out.basm Normal file
View File

@ -0,0 +1,49 @@
!8
'init
'step
'print
'bzz print: voltage:
'battery
'voltage
'reset
'destroy
pushs 0
pushcn @__label_1
gstore
pushs 1
pushcn @__label_2
gstore
pushs 6
pushcn @__label_3
gstore
pushs 7
pushcn @__label_4
gstore
nop
@__label_0
@__exitpoint
done
@__label_1
ret0 |4,1,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
@__label_2
pushs 2 |9,5,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
gload |9,5,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
pushs 3 |9,6,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
pushs 4 |9,37,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
gload |9,37,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
pushs 5 |9,38,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
tget |9,45,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
pushi 2 |9,46,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
callc |9,46,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
ret0 |11,1,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
@__label_3
ret0 |15,1,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz
@__label_4
ret0 |19,1,/home/ubuntu/ROS_WS/src/ROSBuzz/src/test.bzz

BIN
src/out.bdbg Normal file

Binary file not shown.

BIN
src/out.bo Normal file

Binary file not shown.

View File

@ -79,8 +79,8 @@ namespace rosbzz_node{
void roscontroller::Initialize_pub_sub(){
/*subscribers*/
current_position_sub = n_c.subscribe("current_pos", 1000, &roscontroller::current_pos,this);
battery_sub = n_c.subscribe("battery_state", 1000, &roscontroller::battery,this);
current_position_sub = n_c.subscribe("/dji_sdk/global_position", 1000, &roscontroller::current_pos,this);
battery_sub = n_c.subscribe("/dji_sdk/power_status", 1000, &roscontroller::battery,this);
payload_sub = n_c.subscribe("inMavlink", 1000, &roscontroller::payload_obt,this);
/*publishers*/
payload_pub = n_c.advertise<mavros_msgs::Mavlink>("outMavlink", 1000);

View File

@ -1,27 +1,12 @@
# Executed once at init time.
function init() {
i=1
s = swarm.create(10)
s.join()
}
# Executed at each time step.
function step() {
# print all the neighbours position
neighbors.foreach(
function(rid, data) {
print("robot ", rid, ": ",
"distance = ", data.distance, ", ",
"azimuth = ", data.azimuth, ", ",
"elevation = ", data.elevation) })
if(i==1){
s.exec(function() {uav_gohome()})
}
else{
s.exec(function() {uav_goto(1.1234,2.2345,3.3456)})
}
print("bzz print: voltage: ", battery.voltage)
}