Skip to content

Commit 2f5c538

Browse files
authored
fix: use current q7 for IK in move to pose (#32)
1 parent e6c84bc commit 2f5c538

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controllers/trajectory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Trajectory::Trajectory(std::shared_ptr<motion::PandaTrajectory> trajectory,
1414
franka::Torques Trajectory::step(const franka::RobotState &robot_state,
1515
franka::Duration &duration) {
1616
Vector7d q = Eigen::Map<const Vector7d>(robot_state.q.data());
17-
auto q_d = traj_->getJointPositions(getTime(), q);
18-
auto dq_d = traj_->getJointVelocities(getTime(), q);
17+
auto q_d = traj_->getJointPositions(getTime(), q, q[6]);
18+
auto dq_d = traj_->getJointVelocities(getTime(), q, q[6]);
1919
setControl(q_d, dq_d);
2020
auto torques = JointPosition::step(robot_state, duration);
2121
if (getTime() > traj_->getDuration()) {

0 commit comments

Comments
 (0)