-
Notifications
You must be signed in to change notification settings - Fork 806
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
R1 model incorrect #533
Comments
@bperseghetti What gazebo version are you running? |
@Jaeyoung-Lim we are intentionally running gazebo 11. It all seems to work fine in gazebo 11 on commit 8468271. Are you guys planning to officially switch to gazebo 11 anytime soon? Would be nice to use the intended ros-noetic gazebo target. |
@bperseghetti we are not supporting officialy yet since there are some problems to solve still, including in the build process and CI. But it's an ongoing work. |
Regarding your problem: it might require to bump the SDF version of the model to 1.7. I would try that and check if it works or if it still complains about the DOM. |
@TSC21 Side note, have you tested the r1_rover recently? If you run it with verbose:=true and gui:=true I think you will notice that after about a minute it drops sim time down to ~.02 (sometimes lower), In comparison I can put 10 iris models in the sim and still run it at 1.00 (2 Titans in SLI, 24 cores and 256GB ram make all of them barely register on my machine). I think it might have to do with the number of contact points in the wheel mesh. |
Yep we have noted that on recent tests. @Jaeyoung-Lim has been investigating it as well. |
@TSC21 @Jaeyoung-Lim I took a look at the model's wheel contact STL and it looks overly complex. I think if we simply replaced it with a reduced mesh model it might work significantly better. Or why not use something like this for a 6in diameter wheel with 3in width:
|
@bperseghetti Have you tried it with the cylinder? The reason we are using collision as a mesh is
|
@Jaeyoung-Lim I can modify and test. I created an autonomous tractor for a customer in Gazebo 3 years ago and it had very large complex treaded wheels. I used the method I posted above and it worked well. Give me a few to edit the SDF. |
@Jaeyoung-Lim @TSC21 Good news, Real Time Factor stays at 1.00 after 10 minutes+. |
@TSC21 @Jaeyoung-Lim |
@bperseghetti Yes that is exactly what I was seeing, and that was why I reverted to mesh collision for the wheels. You can look at the discussion here: #394 |
@Jaeyoung-Lim Ok, well with the current reduced wheel mesh on my just shy of super computer it doesn't even get to .1 Real Time Factor and also doesn't move in manual mode. I think adding the slip parameters to the SDF also might allow the rest of the wheels to overcome the frictional resistance. Also here is an example of a skid steer project in gazebo that is frequently referenced: https://github.com/husky/husky |
@bperseghetti I didn't mean it to sound as it is not possible. I think the husky model uses a differntial drive plugin, which models the differential drive dynamics (please correct me if I am wrong) Would you be able to take this further? It would be awesome if we can get this working. |
@bperseghetti does the initial reported problem got solved to you? If yes, let's close this and move this discussion to a separate thread as this has diverged from the initial issue. |
@TSC21 Sadly no, bumping to 1.7 still provided same error. |
@TSC21 @Jaeyoung-Lim I found that the motors are not hooked up correctly and I believe the mixing is wrong. Using QGC mavlink inspector I noticed that servo1_raw and servo2_raw are linked together and respond together to yaw input. Furthermore, servo6_raw and servo7_raw are linked together and respond to throttle input. In the SDF there is no correct connection to these. I connected them correctly by changing what is currently in the SDF to:
|
@TSC21 @Jaeyoung-Lim I believe the correct mixing for these should be: |
@TSC21 @Jaeyoung-Lim By doing what I mentioned above I am able to make the vehicle "skid steer" I rotated the links chiral by .2 rad and was able to do this: (yes I know it's not "perfectly pretty" but it at least moves and runs in real time) |
Appears the mixer used is: https://github.com/PX4/Firmware/blob/dfa5ca17104d1174d3e9aeeb3103d1cc592b1632/ROMFS/px4fmu_common/mixers-sitl/rover_sitl.main.mix and is what is loaded in 1060_rover. It should be more based off of: https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/mixers/generic_diff_rover.main.mix Here is a corrected version that I have tested:
|
@Jaeyoung-Lim @TSC21 |
@LorenzMeier @TSC21 @Jaeyoung-Lim Changed:
Now you have a working R1 that no longer has a "Real Time Factor" of 0.02 (that's what I got when testing on a standard system with 1080Ti, 10 core processor, etc). Here's a video of me driving it around with the fixes using QGC and a logitech gamepad: https://youtu.be/PczMFFk1Ltc Things to add to make it better: Joint friction, potential fixes for IMU as it seems rather unstable (I added visualization in sdf if uncommented) and also I believe the wheel base and some other values are off for 1060_rover/1061_r1_rover (though this seems to use the 1060_rover currently). My changes were modified off commit 8468271 in sitl_gazebo and commit 2bbdef2 in Firmware (Beta2 tag). It all works in ros-noetic and gazebo 11. PRs PX4/PX4-Autopilot#15209 and #534 |
Oh and if anyone is wonder the wheels are no longer needed to be slightly rotated (as you can see from above video). Like I showed earlier in the day. Yay! |
@TSC21 @Jaeyoung-Lim Side note, has anyone ever tested the controller for skid steer rover? The only really thing you need is a simple PID for your attitude (yaw) and vehicle velocity (throttle). I'm halfway just tempted to use the output from the gazebo body state to then feed back in to a simple PID for what I need my custom skid steer rover to do. If there is some sort of "skid steer outer loop" doesn't seem to be working very well, maybe it's setup with the assumption of ackerman steering where you can't do a turn in place? I don't even see how wheelbase information is relevant for any estimate for skid steer. At any point you can essentially tell it to "change orientation" and there is no real "penalty" that you have to plan an arc/path for. Anyone know who might be responsible for skid-steer control? |
@bperseghetti If you are talking about the rover PX4 firmware, actually that is the reason I was planning to add a body rate controller for steering. This would be a more sensible way of handling a "steering input" in my opinion. |
@TSC21 have any insight into this, this what I get when compiling current master and using the latest apt-based mavlink/mavros:
|
@Jaeyoung-Lim Yes, it appears there is no specific PX4 Firmware controller for it? Hahaha... Or if there is... Seems like it needs a lot of help. |
@Jaeyoung-Lim you use the PX4 slack channel? If so want to discuss this on there more? |
@bperseghetti Sure I am on slack |
@Jaeyoung-Lim driving rover back and forth in sim for an hour and a half has not slowed down the sim run time from 1.00 |
@Jaeyoung-Lim I can upload an image of the old models performance if you want me to but it hits Real Time Factor of 0.03 100% of the time after 2.5 minutes. Are we good on the PR #534 |
@bperseghetti Sure, it seems like the wrong numbering of the autostart script was the cause. Also the generic rover now has realtime factor close to 1 |
@Jaeyoung-Lim Awesome. Looks like after ~3hrs it's still running strong at realtime: |
Fixed with PR PX4/PX4-Autopilot#15209 and #534 |
- sitl_gazebo in PX4/Firmware (3302a69): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (3302a69): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (1761ef3): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (1761ef3): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (1ea416f): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (547bd4c): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
- sitl_gazebo in PX4/Firmware (38588f0): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532)
…15248) - sitl_gazebo in PX4/Firmware (38588f0): PX4/PX4-SITL_gazebo-classic@309f7b0 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@1af7e29 - Changes: PX4/PX4-SITL_gazebo-classic@309f7b0...1af7e29 1af7e29 2020-06-25 JaeyoungLim - Do not validate r1_rover 5e8ddfb 2020-06-25 Benjamin Perseghetti - fixes for R1 SDF PX4/PX4-SITL_gazebo-classic#533 (#534) 726c066 2020-06-23 Supakorn Suttiruang - Remove the incorrect force generated by moment (#532) Co-authored-by: PX4 BuildBot <bot@px4.io>
R1 SDF is making gazebo run in non-realtime.
The text was updated successfully, but these errors were encountered: