ROSBuzz_MISTLab/misc/cmdlinectr.sh

31 lines
1.3 KiB
Bash
Raw Normal View History

2017-02-22 09:13:23 -04:00
#! /bin/bash
function takeoff {
rosservice call /buzzcmd 0 22 0 0 0 0 0 0 0 0
}
function land {
rosservice call /buzzcmd 0 21 0 0 0 0 0 0 0 0
}
2017-06-13 14:38:28 -03:00
function arm {
rosservice call /buzzcmd 0 400 0 1 0 0 0 0 0 0
}
function disarm {
rosservice call /buzzcmd 0 400 0 0 0 0 0 0 0 0
}
2017-02-22 09:13:23 -04:00
function record {
2017-06-13 14:38:28 -03:00
rosbag record /flight_status /global_position /users_pos /dji_sdk/local_position /neighbours_pos /power_status /guidance/obstacle_distance /guidance/front/depth/image_rect/compressedDepth /guidance/right/depth/image_rect/compressedDepth /guidance/front/depth/points /guidance/right/depth/points /guidance/front/right/image_rect/compressed /guidance/front/left/image_rect/compressed /guidance/right/right/image_rect/compressed /guidance/right/left/image_rect/compressed /guidance/front/left/camera_info /guidance/front/right/camera_info /guidance/right/right/camera_info /guidance/right/left/camera_info
2017-02-22 09:13:23 -04:00
}
function clean {
sudo rm /var/log/upstart/robot*
sudo rm /var/log/upstart/x3s*
}
function startrobot {
sudo service robot start
}
function stoprobot {
sudo service robot stop
}
2017-06-13 14:38:28 -03:00
function updaterobot {
# rosrun robot_upstart install --logdir ~/ROS_WS/log/ robot_upstart/launch/m100buzzynocam.launch
rosrun robot_upstart install --logdir ~/ROS_WS/log/ robot_upstart/launch/m100buzzy.launch
}