Open UestcVan opened 5 years ago
Hello, It seems your "throttle_cmd" is too low. Have you tried to print command output from MPC? Please have a look the line here (https://github.com/ethz-asl/mav_dji_ros_interface/blob/951df2853cffc438726ea6be2c4308f3dbf9b099/dji_interface/src/dji_interface.cpp#L197)
With your D435i is up and running (i.e., you have a valid state estimation, checking with your odometry message), MPC should output valid pitch, roll, yaw rate, thrust output. In order to validate this, you can do some hand-held tests. Moving forward the vehicle should yield a negative pitch angle because MPC tries to bring it back to the reference point (assuming 0, 0, 1 for x,y,z in this case). You can test other axes in a similar way. Hope this help and please let me know how it goes. Best,
I followed the First Autonomous Flight: Hover and Step Response,but the console did not report any errors and warnings, but the M100 did not take off, and now I don't know how to proceed with the next step,I need your further help.
Did you get your state estimation after "rosservice call /yourMavName/pose_sensor_rovio/pose_sensor/initialize_msf_scale 1.0" as described in https://github.com/ethz-asl/mav_dji_ros_interface/wiki/First-Autonomous-Flight%3A-Hover-and-Step-Response?
after "rosservice call /yourMavName/pose_sensor_rovio/pose_sensor/initialize_msf_scale 1.0" ,Console print Initialize filter with scale 1.000000 [ INFO] [1558503720.670661501]: initial measurement pos:[ -0.042306 0.00894509 -0.0317732] orientation: [-0.645, -0.0228, -0.764, -0.000936] [ WARN] [1558503720.776691340]: Using simulated core plus fixed diag initial error state covariance.
[ INFO] [1558503720.786792407]: Initializing msf_core (built: May 13 2019) [ INFO] [1558503720.786843048]: Core parameters: fixed_bias: 0 fuzzythres: 0.1 noise_acc: 0.083 noise_accbias: 5e-05 noise_gyr: 0.0013 noise_gyrbias: 1.3e-06
[ INFO] [1558503720.786937735]: Core init with state: --------- State at time 3720.68s: --------- 0 : [0-2] : Matrix<3, 1> : [ 0.225225 0.246566 -0.349845] 1 : [3-5] : Matrix<3, 1> : [0 0 0] 2 : [6-9] : Quaternion (w,x,y,z) : [0.0468, 0.697, -0.713, -0.0521] 3 : [10-12] : Matrix<3, 1> : [0 0 0] 4 : [13-15] : Matrix<3, 1> : [0 0 0] 5 : [16-16] : Matrix<1, 1> : [1] 6 : [17-20] : Quaternion (w,x,y,z) : [1, 0, 0, 0] 7 : [21-23] : Matrix<3, 1> : [0 0 0] 8 : [24-27] : Quaternion (w,x,y,z) : [0.499, 0.488, -0.498, 0.515] 9 : [28-30] : Matrix<3, 1> : [ 0.2419 0.3039 -0.2798]
we changed the camera from zr300 to d435i,then i see from YouTube video that the coordinates of state and world in your video are different from what we see from rviz, at least from Z axis , Our Z axis of state is downward while your Z axis is upward. Here is the comparison of images.
Is that why the output of the linear mpc algorithm is incorrect and why we can't take off normally ?. If so, how should we modify ?
First, we changed the camera from zr300 to d435i,But I think this should not affect much?After we have completed the previous steps, we perform the First Autonomous Flight: Hover and Step Response step, complete the initialization, and then open rqt, set x=0, y=0, z=1 for position and x =0, y=0, z=0, w=1 for orientation,But the plane is still in place, and it has not taken off, and the speed of the motor has not changed.
Hi, did you choose the rcteleop? if you set use_rcteleop true, you have to inactive the RC and set position mode. you can check the state machine PDF
First, we changed the camera from zr300 to d435i,But I think this should not affect much?After we have completed the previous steps, we perform the First Autonomous Flight: Hover and Step Response step, complete the initialization, and then open rqt, set x=0, y=0, z=1 for position and x =0, y=0, z=0, w=1 for orientation,But the plane is still in place, and it has not taken off, and the speed of the motor has not changed.