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

bodyAccB change with random key-value in yaml #274

Closed N1ckfm closed 2 years ago

N1ckfm commented 2 years ago

Hi, I've noticed that when I add any key-value to the yaml file in the controller use or not use it in the controller, it indirectly affects the bodyAccB in this case the surface of the foot in the HRP4.

For example in some cases if the key is more than 15 characters or depend the number of item inside I get:

text:
  value1: 1.0
  value2: 1.0

for parentIdx: 18 real.bodyAccB()[parentIdx]:

7.51457e+199 9.53545e-307 5.92716e+228 1.25757e+180 7.35519e+223 9.54083e-307

In other cases for the same condition but in other position in the yaml file:

text:
  value1: 1.0
  value2: 1.0

for parentIdx: 18 real.bodyAccB()[parentIdx]:

0 1.56125e-321 0 0 0 0

I will appreciate the comments to which this strange behavior is due. Thanks Nick

gergondet commented 2 years ago

I don't think real.bodyAccB() is ever computed by the observers so you are looking at unitialized values. They might be influenced by other things in the program, including the content of the configuration.

You can run: real.forwardAcceleration() to update bodyAccB based on the other data in the real instance.