Skip to content

Commit 30af92a

Browse files
authored
Command current state on hardware activate (#78)
1 parent 0705714 commit 30af92a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

abb_hardware_interface/src/abb_hardware_interface.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,17 @@ CallbackReturn ABBSystemHardware::on_activate(const rclcpp_lifecycle::State& /*
277277
}
278278

279279
egm_manager_->read(motion_data_);
280+
for (auto& group : motion_data_.groups)
281+
{
282+
for (auto& unit : group.units)
283+
{
284+
for (auto& joint : unit.joints)
285+
{
286+
joint.command.position = joint.state.position;
287+
joint.command.velocity = 0.0;
288+
}
289+
}
290+
}
280291

281292
RCLCPP_INFO(LOGGER, "ros2_control hardware interface was successfully started!");
282293

0 commit comments

Comments
 (0)