Skip to content

Commit

Permalink
fix differential_transmission tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Nov 4, 2024
1 parent 7f7e608 commit 85af879
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,19 @@ void DifferentialTransmission::configure(
throw Exception("No actuator handles were passed in");
}

if (std::any_of(
joint_handles.cbegin(), joint_handles.cend(), [](const auto & handle) { return !handle; }))
{
throw Exception("Null pointers in joint handles");
}

if (std::any_of(
actuator_handles.cbegin(), actuator_handles.cend(),
[](const auto & handle) { return !handle; }))
{
throw Exception("Null pointers in actuator handles");
}

const auto joint_names = get_names(joint_handles);
if (joint_names.size() != 2)
{
Expand Down
Loading

0 comments on commit 85af879

Please sign in to comment.