Open xiaobai-cai-hold opened 2 years ago
At first I make the vehicle to work offboard mode , I send
publish_vehicle_command(VehicleCommand::VEHICLE_CMD_NAV_VTOL_LAND) or publish_vehicle_command(VehicleCommand::VEHICLE_CMD_DO_SET_MODE,1.0, 4.0,2.0)
the vehicle in gazebo can land successfully.
According to the way I send this command
publish_vehicle_command(VehicleCommand::VEHICLE_CMD_NAV_VTOL_TAKEOFF)
however it dosen't takeoff , a little upset.
Hi @xiaobai-cai-hold !
I'm reviving this thread as I have the same problem, were you able to solve it in the end (taking off using ROS2, without using the offboard position mode) ?
I tried to do the same thing but I haven't found any success. I found that if the vehicle is in OFFBOARD MODE
, the VEHICLE_CMD_NAV_TAKEOFF
won't work. But, even if it is not on offboard mode, I am getting this message WARN [navigator] Already higher than takeoff altitude
and the vehicle disarms it self after spinning the props for 1 or 2 secs.
Throwing in my two sense that I have the same issue as @AumJasani, very odd
I find that someone control vehicle to takeoff in offboardcontrol.cpp by using (publish_offboard_control_mode() publish_trajectory_setpoint(0.0, 0.0, 2) ).
however , I found VehicleCommand::VEHICLE_CMD_NAV_TAKEOFF in vehiclecommand.msg, I am confused ,why not use it to control vehicle to takeoff?
I test this command by using the following code , I failed in gazebo, how to use VehicleCommand::VEHICLE_CMD_NAV_TAKEOFF to takeoff?
I am a student ,first to touch this ,can you provide some instruction to help me learn to control vehicle via ros2? thanks