WPI-AIM / ambf

Asynchronous Multi-Body Framework
163 stars 67 forks source link

ambf python client mask joints up to last used idx #205

Closed htp2 closed 1 year ago

htp2 commented 1 year ago

Hi Adnan - as discussed today, it would be great if we could not send zero effort commands to joints after the last commanded index. This would prevent long kinematic chains from having their later joints un-controllable if commands are being sent to upstream joints/bodies.

So if there are 8 joints numbered 1-8, and we only command up to index 6, currently, joints 7 and 8 will get sent zero effort commands. Instead, we would just not send any commands for joints 7 and 8.

Relevant section of the code is ambf/ambf_ros_modules/ambf_client/python/ambf_rigid_body.py Line 714.

nag92 commented 1 year ago

@adnanmunawar I thought I implemented this years ago.

adnanmunawar commented 1 year ago

Hi Henry, I believe that the above commit should fix the issue. If it does, we can merge it with the master branch.

@nag92 Probably, but it seemed to no longer be the case.

htp2 commented 1 year ago

Hi @adnanmunawar, we discussed this in person a week or so back, but just wanted to confirm here that this fix has worked and we should be able to merge it into the master branch. Thanks!

adnanmunawar commented 1 year ago

Thanks Henry, will merge it now.