rapyuta-robotics / rclUE

Apache License 2.0
113 stars 30 forks source link

Usage without a fixed framerate #133

Open alassagne-sl opened 3 months ago

alassagne-sl commented 3 months ago

Hello, I'm using this Plugin with ROS Humble / Unreal 5.3.2 and it works very nicely. Thank you for that!

I wonder if it's possible to run a project without the FixedFramerate constraint. In certain cases I'd like to be live and not in simulation time, dropping frames instead of slowing down. Also the synchronization mecanisms is pretty hard on the performance, the same scene in another project is much faster.

Is there a way to disable this behaviour?

yuokamoto commented 3 months ago

Hello, thanks for your question.

I think you can run project without fixed frame rate by changing setting around here https://github.com/rapyuta-robotics/turtlebot3-UE/blob/6f118f8a08f5b5251e458b014d9a8a03c35736ab/Config/DefaultEngineBase.ini#L19

bUseFixedFrameRate=True
FixedFrameRate=${FIXED_FRAME_RATE}
TargetRTF=${TARGET_RTF}
CustomTimeStepClassName=/Script/RapyutaSimulationPlugins.RRLimitRTFFixedSizeCustomTimeStep
braoutch commented 3 months ago

Hi, thank you for your response. Simply changing this setting did not work for me. I don't have much time this week but I'll investigate more and report my conclusions in this thread.

yuokamoto commented 3 months ago

Could you please check project setting as well? image

Bvallon-sl commented 3 months ago

Hi,

We want to not use the CutomTimeStep, but when we remove it from the project settings and the .ini files, it's still used. Do you have any idea why? Maybe, it's set in the code but I did not find it.

Thanks again for your help and your project, it's amazing.

Best.

james-yoo commented 3 months ago

@braoutch, @Bvallon-sl If you are using the 'run_editor.sh' script in the turtlebot3-UE repo, you should modify the 'Config/DefaultEngineBase.ini' file or comment out the line below: https://github.com/rapyuta-robotics/turtlebot3-UE/blob/6f118f8a08f5b5251e458b014d9a8a03c35736ab/run_editor.sh#L24

Bvallon-sl commented 3 months ago

Hi,

Thanks for the help but I no longer use the run_editor script because It overrides the project settings at each start. In the config file, I even setCustomTimeStepClassName=None but It looks like it's still used, that's why I was wondering if it was enabled somewhere else.

yuokamoto commented 3 months ago

Did you try change CUstomTimeStepClassName from Project Setting in the editor before play?
https://docs.unrealengine.com/4.27/en-US/Basics/Projects/ProjectSettings/