Closed ndepal closed 8 years ago
If you are running gazebo, I guess your initial local position (x,y,z)=(0,0,0) is not actually the (0,0,0) in the UTM coordinates( have you checked? )
Why not use the ~setpoint_position/local topic?
First, you have to go into the guided mode and take off.
First, you have to go into the guided mode and take off.
@LiYuanxing wrong. First, PX4 does not have Guided mode. Second, does not have nothing to do with this issue.
Hi, I am also facing this issue.
As per above suggestion, I checked setpoint_position/local
topic. But it is empty!
$ rostopic echo /mavros/setpoint_position/local
I tried setting this to (0,0,0), Still takeoff is not working as expected.
I'm trying to control a drone (the iris model) in Gazebo through mavros. For this I have written a ROS node that sends commands/service requests on the
mavros/cmd/arming
,mavros/set_mode
,mavros/cmd/takeoff
, andmavros/mission/...
to mavros.I start the simulation with
make posix_sitl_default gazebo
and run mavros withroslaunch mavros px4.lauch fcu_url:=udp://:14540@127.0.0.1:14557
, I can see that mavros can talk to PX4.The problem that I have is that when I issue the command
The drone takes off and immediately pitches up, flying backwards at around 5 m/s. Sometimes it also scrapes the ground and flips.
If I just do
commander takeoff
in the PX4 shell, the drone takes off as expected. I have the same problem when I try to take off withrosrun mavros mavcmd takeoffcur 0 0 2
.Is there something I am doing wrong?