jrl-umi3218 / mc_rtc

mc_rtc is an interface for simulated and real robotic systems suitable for real-time control
BSD 2-Clause "Simplified" License
122 stars 37 forks source link

ISSUE ABOUT CPU USAGE RATE #437

Closed EthanZengg closed 8 months ago

EthanZengg commented 9 months ago

HI, @gergondet I attempted to use the BaselineWalkingController to control a 48-dof robot with mc_rtc_ticker(200hz control loop frequency) . However I observed that the both the calculation speed of mc and the CPU usage rate are low , are there any solutions available to make full use of CPU?(Or perhaps this is a normal phenomenon?)

图片

图片

图片

hope to receive your answer

gergondet commented 9 months ago

Hi @EthanZengg

This is not normal for computation times at least. Have you built the controller with CMAKE_BUILD_TYPE set to RelWithDebInfo or Release?

EthanZengg commented 9 months ago

Hi, @gergondet, Thank you for your response. Yes, I built it using the following command. catkin build baseline_walking_controller -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_OSQP=ON --catkin-make-args all tests

gergondet commented 9 months ago

I'm not sure this is the correct way to pass the build type, could you try:

catkin build baseline_walking_controller --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_OSQP=ON --catkin-make-args all tests 
EthanZengg commented 9 months ago

I thank it should be correct .However I rebuilt it using the new method ,and the problem still persists. This is result displayed by mc_bin_perf when using the JVRC1,

图片