Skip to content

Commit

Permalink
publish offset joint states
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Oct 23, 2020
1 parent a2a59d8 commit fcc1b6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion robot_calibration/src/tools/viz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,13 @@ int main(int argc, char** argv)
pub.publish(markers);

// Publish the joint states
state.publish(data[i].joint_states);
sensor_msgs::JointState state_msg = data[i].joint_states;
for (size_t i = 0; i < state_msg.name.size(); ++i)
{
double offset = offsets.get(state_msg.name[i]);
state_msg.position[i] += offset;
}
state.publish(state_msg);

// Wait to proceed
std::cout << "Press enter to continue...";
Expand Down

0 comments on commit fcc1b6e

Please sign in to comment.