[ServoController] Fix explicit bugs #1286
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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=19yFCOOD3o0bqJKtdLQQGNjTPPqdKmtbf
Cause & 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.