Skip to content

Commit

Permalink
Adding ability to control the arm from the debug editor and move the …
Browse files Browse the repository at this point in the history
…arm with offsets rather than absolute positions.
  • Loading branch information
Lucaweihs committed Jun 21, 2021
1 parent 35d7922 commit aea035b
Show file tree
Hide file tree
Showing 3 changed files with 274 additions and 147 deletions.
22 changes: 22 additions & 0 deletions unity/Assets/Scripts/ArmAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ protected IK_Robot_Arm_Controller getArm() {
return arm;
}

public void MoveArmRelative(
Vector3 offset,
float speed = 1,
float? fixedDeltaTime = null,
bool returnToStart = true,
string coordinateSpace = "armBase",
bool restrictMovement = false,
bool disableRendering = true
) {
IK_Robot_Arm_Controller arm = getArm();
arm.moveArmRelative(
controller: this,
offset: offset,
unitsPerSecond: speed,
fixedDeltaTime: fixedDeltaTime.GetValueOrDefault(Time.fixedDeltaTime),
returnToStart: returnToStart,
coordinateSpace: coordinateSpace,
restrictTargetPosition: restrictMovement,
disableRendering: disableRendering
);
}

public void MoveArm(
Vector3 position,
float speed = 1,
Expand Down
Loading

0 comments on commit aea035b

Please sign in to comment.