- Source enviroument in linux computer.
cd test_ma_ws/
source ros.zsh
cd src/itm
tmuxinator start -p sitl_gazebo.yml
- Start MPC controller in simulation.
roslaunch itm_nonlinear_mpc px4_exp_node.launch is_simulation:=true mpc_and_gp:=false
- Let the quadrotor take off and record rosbag.
rosbag record -a
rostopic pub /itm_quadrotor_control/user_command itm_mav_msgs/SetMission "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
command_idx: 0
mission_mode: 1"
- The quadrotor flies on a trajectory.
itm roslaunch itm_nonlinear_mpc offboard_sim_trajectory_generator_launch.launch horizon:=1 traj_type_idx:=1
itm rosrun itm_nonlinear_mpc offboard_sim_random_gazebo_trajectory_commander.py
offboard:
rostopic pub /itm_quadrotor_control/user_command itm_mav_msgs/SetMission "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
command_idx: 0
mission_mode: 3"
- Land the quadrotor.
rostopic pub /itm_quadrotor_control/user_command itm_mav_msgs/SetMission "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
command_idx: 0
mission_mode: 2"
cd ./src/itm/itm_quadrotor_node/itm_nonlinear_mpc/scripts/gaussian_process/gpr/gp_process.yml
tmuxinator start -p gp_process.yml folder_name=q330/20211008_10_with_cargo offset=0.44
- exact GP (velocity -> acceleration)
python3 gpr_GPyTorch_train.py q330/20211008_10_with_cargo data_for_gp_y.npz
python3 gpr_GPyTorch_predict.py q330/20211008_10_with_cargo data_for_gp_y.npz
- exact GP (velocity, altitude -> acceleration)
python3 gpr_GPyTorch_train_2d.py q330/20211008_10_with_cargo data_for_gp_y.npz
python3 gpr_GPyTorch_predict_2d.py q330/20211008_10_with_cargo data_for_gp_y.npz
- approximate GP prediction(velocity -> acceleration)
python3 gpr_GPyTorch_dataload_train.py q330/20211008_10_with_cargo data_for_gp_y.npz
python3 gpr_GPyTorch_dataload_predict.py q330/20211008_10_with_cargo data_for_gp_y.npz
- approximate GP training(velocity, altitude -> acceleration
python3 gpr_GPyTorch_approximate_train_2d.py q330/20211008_10_with_cargo data_for_gp_y.npz
python3 gpr_GPyTorch_approximate_predict_2d.py q330/20211008_10_with_cargo data_for_gp_y.npz
roslaunch itm_nonlinear_mpc px4_exp_node.launch is_simulation:=true mpc_and_gp:=true
python3 ./ACADOS_temp_set_p/quad_sim_q.py
Turn on the electromagnet.
roslaunch magnet_control magnet.launch pubMagnet:=true