AntoineRichard / OmniLRS

SpaceR and SRL Lunar simulation
Other
49 stars 13 forks source link

Weird jolts during drives #23

Open TL-4319 opened 2 months ago

TL-4319 commented 2 months ago

First and foremost, thank you for the great work. I have been experimenting with the simulator and I seeing some behavior during driving where sometime there are just random jolts that shake the rover. The video had modification made to the physics scene where gravity is set to 1.62 m/s^2 but the behavior still exist at the default gravity of 9.81. Changing the simulation dt to 0.01 doesn't seem to get rid of it completely.

Screencast from 08-16-2024 02:58:56 PM.webm

I would like to ask if you guys are also seeing this phenomenon during your runs and have some suggestion of what could be done? I am currently reading into different collision mesh by isaac sim as well.

Thank you

AntoineRichard commented 2 months ago

Hey there, thanks for the feedback! We are aware of the problem.

I think this is related to the way the collider mesh is generated, though I'm not 100% certain.

I am currently busy with other projects, but I was planning on investigating this in early September. One way to check is to save that very scene, load it into blender, and see if the normals of the mesh are all facing the same direction. You may also want to check if they are pointing in the right direction.

If they are not let me know, I could release a quick fix.

If you fix the issue before I do, send a PR, I'll merge it :).

Otherwise, I'll update this issue when the fix is released.

Cheers,

Antoine

TL-4319 commented 2 months ago

A fix that I found recently is to change the physics scene collision system from PCM to SAT

This is the lunaryard 20m environment with PCM collision Screencast from 08-19-2024 09_56_52 AM.webm

This is the lunaryard 20m environment with SAT collision Screencast from 08-19-2024 10_12_27 AM.webm

Right now, the change from PCM to SAT is done via Isaac Sim GUI. I have not found a way to do it programatically yet even though I check several doc for physicx and Isaac sim so I don't really have code changes for a PR for now. Hopefully, something can be found regarding that with more research.

Even then, during drives, i need to mess around with the wheel collider material by adding some compliance and dampening. So far it has been trying different things randomly but I plan on doing more experimentation over the weekends. I'll share the finding later if there are any.

AntoineRichard commented 2 months ago

Did you try on Isaac 4.1.0 ? I have tested some parts of the code in 4.1.0, not the whole stack so I don't know if it runs. But it could be interesting to know if this is bug on our side, or on Isaac's. The collider mesh has a very fine resolution, which they may not have tested for.

TL-4319 commented 2 months ago

This is run on Isaac Sim 2023.1.1 following the instruction in the readme. I'm not sure either if they have tested much with uneven terrain mesh either based on what I have searched on their forum. Is the coming release migrating to Isaac 4.1.0?

AntoineRichard commented 2 months ago

Just to confirm that this is an issue in Isaac 2023.1.1, it's no longer happening in 4.1.0. We did some tests, and should be able to switch to 4.1.0 if need be. I think I also have a fix for Isaac 2023.1.1. We will release the update together with new envs in a week or so.

AntoineRichard commented 1 month ago

@TL-4319 this should be fixed now? The new version of the stack should be more robust. The doc will be rolling in the next 2 days.

TL-4319 commented 1 month ago

That's great to hear! So Isaac 4.1.0 should fix this problem? I saw on the readme of OmniLRS V2 that you are encountering some weird rendering problem? Can you briefly explain that so I can decide on if switching to 4.1.0 is the best choice? Thanks

AntoineRichard commented 1 month ago

It's fixed in 2023.1.1 as well. Or at least I don't have the issue too much.

For the bug you check it out here. https://docs.google.com/document/d/1ZgLjNSMZJYe_n1JQaif4JvXOjEgFlmpbwR7uobstjvk/edit?usp=sharing

The bug only impacts the new "large scale" environments. But it's what makes the framework really interesting IMO. You can now simulate 20 kilometers wide or more environments. We successfully simulated 200km large envs without major issues.

If you try it, let me know.

TL-4319 commented 1 month ago

I performed testing with physics with OmniLRS v2. I was not able to test it with the provided Husky and Jackal USD due to a crash issue mentioned in issue #25 so I did the test with the viper.usd.

The physics did improve for the Lunaryard environment. However, it is worse with the largescale environment. Changing collision system to SAT improved it slightly but the problem persists.

I will perform some more test with wheel collider material tuning to see if it fixes. If the problem persist, I will try IsaacSim 4.1.0

Some videos of the behaviors will come as I perform more tests

OldCatBruce commented 1 week ago

May I ask how you make the vehicle move?Thank you!

TL-4319 commented 1 week ago

I was using a joystick and ROS2 joy_node to control the robot. You'll need to make sure that the robot you are using has an Action Graph that subscribes to the twist command from ROS2.

OldCatBruce commented 1 week ago

Thank you for your answer. I will try again before communicating with you.