Skip to content

Commit 2bd586d

Browse files
Merge pull request #24 from pollen-robotics/19-goal-position-kept-when-turning-robot-compliant
19 goal position kept when turning robot compliant
2 parents dc70d73 + 5975d8e commit 2bd586d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Packages/ReachySimulator/Scripts/CameraServiceServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public override async Task StreamImage(StreamImageRequest imageRequest, Grpc.Cor
109109
}
110110
catch (OperationCanceledException e)
111111
{
112-
112+
Debug.LogWarning(e);
113113
}
114114
}
115115

Packages/ReachySimulator/Scripts/JointServiceServer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public override async Task<JointsCommandAck> StreamJointsCommands(IAsyncStreamRe
132132
}
133133
catch (OperationCanceledException e)
134134
{
135-
135+
Debug.LogWarning(e);
136136
}
137137
return (new JointsCommandAck { Success = true });
138138
}
@@ -306,7 +306,7 @@ public override async Task StreamJointsState(StreamJointsRequest jointRequest, G
306306
}
307307
catch (OperationCanceledException e)
308308
{
309-
309+
Debug.LogWarning(e);
310310
}
311311
}
312312

@@ -438,7 +438,7 @@ public override async Task<FullBodyCartesianCommandAck> StreamFullBodyCartesianC
438438
}
439439
catch (OperationCanceledException e)
440440
{
441-
441+
Debug.LogWarning(e);
442442
}
443443

444444
return (new FullBodyCartesianCommandAck
@@ -651,7 +651,7 @@ public override async Task StreamSensorStates(StreamSensorsStateRequest stateReq
651651
}
652652
catch (OperationCanceledException e)
653653
{
654-
654+
Debug.LogWarning(e);
655655
}
656656
}
657657
}

Packages/ReachySimulator/Scripts/ReachyController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ void Update()
161161
if (!m.name.StartsWith("neck"))
162162
{
163163
JointController joint = m.gameObject.GetComponent<JointController>();
164-
joint.RotateTo(m.targetPosition);
164+
if (m.isCompliant)
165+
joint.RotateTo(m.presentPosition);
166+
else
167+
joint.RotateTo(m.targetPosition);
165168
joint.IsCompliant(m.isCompliant);
166169

167170
m.presentPosition = joint.GetPresentPosition();

0 commit comments

Comments
 (0)