cd ${HOME}
mkdir -p state_machine_ws/src
cd ${HOME}/state_machine_ws/src
catkin_init_workspace
git clone https://github.com/bing0037/state_machine.git
cd .. # to workspace directory
catkin_make
run pixhawk connection:
roslaunch mavros px4.launch fcu_url:="udp://:[email protected]:14557"
run pixhawk&gazebo:
cd ~/code/pixhawk/px4_vtol/ #your pixhawk directory
make posix_sitl_default gazebo
run state_machine:
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine send4setpoint
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine send10picture_position
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine offb_simulation_test
switch pixhawk to proper mode:
rosrun mavros mavsys mode -c OFFBOARD
rosrun mavros mavsafety arm
run pixhawk connection:
roslaunch mavros px4.launch
run state_machine:
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine send4setpoint
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine send10picture_position
source ${HOME}/state_machine_ws/devel/setup.bash
rosrun state_machine offb_simulation_test
https://github.com/SIA-UAVGP/mavros
rqt_graph