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

dimWeight and activeJoints in task configuration #232

Closed mmurooka closed 2 years ago

mmurooka commented 2 years ago

If dimWeight and activeJoints/unactiveJoints are specified at the same time in the task configuration in the YAML file, dimWeight is ignored. I confirmed this with the following MomentumTask, but I think it is also true for other tasks that inherit from TrajectoryTaskGeneric.

MomentumTask:
    type: momentum
    stiffness: 100.0
    weight: 1000.0
    dimWeight: [1, 1, 1, 0, 0, 0]
    activeJoints: [ <Joint names...> ]

I think this is because dimWeight is not taken over in the following line when setting active joints. https://github.com/jrl-umi3218/mc_rtc/blob/ea030def79f099f9b179e6eea0feef9cc569677a/include/mc_tasks/TrajectoryTaskGeneric.hpp#L216-L219

gergondet commented 2 years ago

Thanks for reporting the issue. It has been fixed in the commit referenced above.

mmurooka commented 2 years ago

@gergondet Thank you!