Skip to content

Commit

Permalink
Merge pull request #1103 from Naoki-Hiraoka/fix-fullbody-controller
Browse files Browse the repository at this point in the history
[HrpsysSeqStateROSBridge.cpp] set body to reference angle when Goal comes
  • Loading branch information
k-okada committed Jun 29, 2022
2 parents 07f7e19 + 9c909ab commit 535106b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hrpsys_ros_bridge/src/HrpsysSeqStateROSBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ void HrpsysSeqStateROSBridge::onJointTrajectory(trajectory_msgs::JointTrajectory

std::vector<std::string> joint_names = trajectory.joint_names;

// set body to current reference angle
if ( m_mcangle.data.length() == body->joints().size() ) {
for (unsigned int i = 0; i < body->joints().size(); i++){
body->joint(i)->q = m_mcangle.data[i];
}
}

for (unsigned int i=0; i < trajectory.points.size(); i++) {
angles[i].length(body->joints().size());

Expand Down

0 comments on commit 535106b

Please sign in to comment.