Closed harewei closed 8 years ago
I guess in the gazebo simulation, you are not giving any visual feedback(e.g. cameras) for the position estimator to have reference
You should publish the proper vision data so the vision estimate can have a proper estimate in position
The gazebo simulation for PX4 is publishing optical flow.
@LorenzMeier Thanks for correcting comment :)
Hi @harewei , I am facing the same issue at the moment. I am running gazebo with SITL and would like to update the current position by publishing data to mavros/vision_pose/pose. The idea is to use some sort of slam algorithm later to estimate the position in the future. When echoing mavros/local_position/local the position does not change. The message I am sending should be correct I am sending the same message like you. How did you solve this issue?
Thomas
Edit: Works now.
Hi @Thomas00010111
i have the same problem. Have you already solved it? can you tell me how did you solve this issue?
I am also having this issue using LPE
It seems we have some people who have the same problem including me.
@NCharabaruk How can use solve by using LPE this is my c code but local pose does not change anything
Hello
Currently I'm using OFFBOARD mode in gazebo simulator for position control. With mavros/setpoint_position/local, I can control the position of the vehicle. Now, I'm publishing to the topic mavros/vision_pose/pose in http://wiki.ros.org/mavros_extras#vision_pose_estimate as follows
The mavros node does not give any error or confirmation, so I tried to echo the topic mavros/local_position/local, but the positions do not match the values I publish through vision_pose. Is this because the vehicle's local position is bound to the gazebo simulated world, or does vision_pose not suppose to change its local position?
I'm doing this simulation because later on, I wish to implement a vision system on the copter for indoor movements.
I've read on http://dev.px4.io/external-position.html that I need to set two parameters for enabling external pose input, which I have not done so because I don't know how to do it through mavros code. If this is the problem, can someone tell me how to?
Thank you.
EDIT: I forgot to give the header
mavros/local_position/local does indeed to be changing to my values in vision_pose, but it keeps decreasing. To illustrate, my vehicle is at (0,0,0) and vision_pose is set as (5,0,2) when I display its local pose, I get
So basically it keeps decreasing then returns to (5,0,2) again. I'm guessing this is because the vehicle is at (0,0,0) in the simulated world. How can I stop this from happening by suppressing it?
UPDATE: I tried it on a real copter, the x and y value work as expected, but even though the z value changes for a split second, it returns to the real world value very quickly. This is possibly due to z being updated by barometer or something. So the question remains the same, how can I disable all xyz value updates by the copter and only accept those from vision_pose_estimate?
UPDATE 2: I've found that I have to edit the INAV parameters. However, whether I follow the parameters in https://github.com/AutoModality/vis_pose_test/issues/2 , or by setting all INAV parameters in https://pixhawk.org/firmware/parameters#position_estimator_inav to 0 except those involving vision, the local position published are still doing weird things in gazebo simulator. It would be great if someone can give me their parameter settings in order to tell the vehicle's position purely based on vision estimate.