setJointAnglesOfGroup has a bug.
The length of id, tms, and rad is len (4 in HIRONX), but servo_id.size() (8 in HIRONX) is passed as their length to setPositions.
After this PR, len is passed to setPositions.
Other Minor Fix
I found wrong pointer passing in sendPacket.
As echo is array, &echo which is passed to read means pointer of pointer.
read requires simple pointer, so simply passing echo is correct.
What is problem
When I moved the right hand of HIRONX using the latest hrpsys including some modifications, the left finger of left hand also moved. What I commanded is as follows:
robot.HandClose('lhand')
has no problem, butrobot.HandOpen('rhand')
unexpectedly moved left hand. You can see the behavior in this video: https://drive.google.com/open?id=19yFCOOD3o0bqJKtdLQQGNjTPPqdKmtbfCause & Solution
setJointAnglesOfGroup has a bug. The length of
id
,tms
, andrad
islen
(4 in HIRONX), butservo_id.size()
(8 in HIRONX) is passed as their length tosetPositions
. After this PR,len
is passed tosetPositions
.Other Minor Fix
I found wrong pointer passing in sendPacket. As
echo
is array,&echo
which is passed toread
means pointer of pointer.read
requires simple pointer, so simply passingecho
is correct.