-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding reset model plugin for gazebo sim #380
Conversation
Signed-off-by: Omar Shrit <shrit@lri.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. How do you trigger this?
@julianoes I have only to call this function, and it will reset all the quadrotors models
|
So a |
Well, I think we should, since I did not find any message, and I have to find a solution quickly, I ended up using only one part of a vector2D, which is not appropriate. |
I did not have a change to test it since my gazebo is not working. Signed-off-by: Omar Shrit <shrit@lri.fr>
Signed-off-by: Omar Shrit <shrit@lri.fr>
@shrit As far as I can see, this will only reset the simulation state of the model and not the firmware. Wouldn't this result in bad local position estimation? Do you have any logs of the firmware to see what happens when you reset the model? |
Well, if you wait for around 20 seconds after the resetting, you will have a very low chance of getting bad local position estimation. |
@Jaeyoung-Lim For the log, actually I do not have any firmware log, since I verify that all the quadrotors are landed before resetting them. |
@shrit For me this plugin needs to include the firmware reboot since resetting just the position in simulation is a little wierd for me. I believe in some cases the EKF might not be able to recover. The reboot does not necessarily need to be done from mavsdk. You can just send the reboot command via mavlink through the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to make this a plugin. The functionality is so simple that can be brought into a function in common.h
and be called in gazebo_mavlink_interface
.
Just to summerise everything: |
Yes. It's as simple as sending a command. No complexity around it, compared with other plugins we have here. |
Trying to merge reset and reboot the px4 firmware, I have discovered that the reboot command is killing the entire simulation session as doing shutdown |
@shrit any updates on this? Again, I don't think that a plugin specific for this is required. Just a note that |
@TSC21 I agree with you, we do not have to create a separate plugin, but I did not work on it since we have to reboot the firmware with the physical state of the quadrotor instead of only resetting the quadrotors. This will avoid any potential problems with EKF. At this time, using the reboot command in the SDK to reboot the firmware will only shutdown the simulation since there is no real reboot for PX4 in SITL. I have opened an issue about this problem which can be found here: PX4/PX4-Autopilot#14070, there is an open pull request by @julianoes which can be found here: PX4/PX4-Autopilot#11654 |
PX4/PX4-Autopilot#11654 will need a lot more work. |
@shrit Is there anything being done regarding this PR? |
@Jaeyoung-Lim I can not tell, since it depends on several issues that they went on stale already |
@shrit My question was if there was any updates on your side, since you opened this PR. |
@Jaeyoung-Lim I think I have developed more on this since the last commit, but finally, we need to merge this functionality directly into |
@shrit This PR seems to be stale for almost a year. I think functionality is something that we do need, but since there is no activity, I am closing this PR. Please re open if you get the time to work on this agian |
No worries, I am very occupied at this time, not even before next year, so you can close it without any issue. |
Signed-off-by: Omar Shrit shrit@lri.fr