rohanpsingh / mc_mujoco

MuJoCo interface for mc-rtc
https://arxiv.org/abs/2209.00274
BSD 2-Clause "Simplified" License
77 stars 18 forks source link

something wrong with function 'self.postureTask.target()' in my_first_controller.py #35

Closed zzz622848 closed 1 year ago

zzz622848 commented 1 year ago

print('{"NECK_Y": self.robot().qu[self.jointIndex]}', {"NECK_Y": self.robot().qu[self.jointIndex]}) output is: {"NECK_Y": self.robot().qu[self.jointIndex]} {'NECK_Y': [1.2217304764]}

self.postureTask.target({"NECK_Y": self.robot().qu[self.jointIndex]}) code will stop running here and quit from function run_callback()

zzz622848 commented 1 year ago

CoM task is tested successfully. I checked the function in cpp: void PostureTask::target(const std::map<std::string, std::vector> & joints), I guess this is the compatiblity problem between std::map in C++ with dict in Python.