-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
local_position/pose unable to adjust properly when /gazebo/set_model_state is called #754
Comments
Use spawn from gazebo_ros to set the initial position. You are effectively moving it after you initialize the filter, so it is probably using gps to update to the new location. |
I assume that will be the position estimator recomputing the position through the filter. |
Thank you for the quick response! The looked up the filter and that sounds right!
Is this what you mean? I have to reset the model position multiple times during the simulation so that is why I am using gazebo/set_model_state. |
If you restart the position you will have to restart the position estimator also. |
Ok this is good to know for future work. For the purpose of my simulation, I wil just used the /gazebo/get_model_state service to get this info. Thank you for the quick help! |
Going off of this, is it possible to reset the lpe programmatically? I can open another ticket if that is prefered |
Currently mavlink doesn't have any kind of state reset message to my knowledge, this would also be useful to me. |
Agree. Please open an issue on PX4 Firmware. You can also create a state reset command and create a PR to Mavlink repo so to update common msg definitions with that command. |
The only way I was thinking this would be possible would be to use the mavlink_shell and call local_position_estimator stop followed by local_position_estimator start. But my mavlink_shell wasn't working :/ |
This will only be possible with a Mavlink command. And from there a state reset on the position estimator. |
This is only bug and feature tracker, please use it
to report bugs or request features.
Issue details
When I call /gazebo/set_model_state to reset my model to 0,0 the local position does not hop to 0,0. Instead it slowly moves down.
For Example:
My drone is at 25,25 (x,y) and I reset it to 0,0. I keep printing the local position and instead of it reading 0,0 it reads 25,25 24,24 23,23 etc etc. until it reaches 0,0.
Is this a bug or am I implementing the local_position topic wrong?
Thank you for any help you can provide!
MAVROS version and platform
Mavros: 0.19.0
ROS: Kinetic
Ubuntu: 16.04
Autopilot type and version
[ ] ArduPilot
[x] PX4
Version: 1.0.0
Node logs
Diagnostics
Check ID
The text was updated successfully, but these errors were encountered: