Skip to content

Commit

Permalink
Fix cobots exception on empty target list
Browse files Browse the repository at this point in the history
  • Loading branch information
visose committed Dec 12, 2022
1 parent 7df5277 commit fa9b238
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Robots/RobotSystems/CobotSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ internal override IList<Joint> GetJoints(int group)

public override List<KinematicSolution> Kinematics(IEnumerable<Target> targets, IEnumerable<double[]?>? prevJoints = null)
{
if (!targets.Any())
return new(0);

var target = targets.First();
var prevJoint = prevJoints?.First();
string? error = null;
Expand Down

0 comments on commit fa9b238

Please sign in to comment.