get_state_of_arm()
- 1 Minute to read
get_state_of_arm()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
get_state_of_arm()
Retrieve information about the current state of a specific arm.
Reference
Arguments
Argument | Type | Default value | |
---|---|---|---|
arm | str | Name of the arm whose state will be returned. |
Return
Dict object with information about the arms' joints: their limits and their current positions, velocity, and effort.
See the example below for more information.
Exceptions
Exception | Condition |
---|---|
RayaArmsException | Exception from arms method. |
RayaArmsControllerNotReady | Arms controller not yet ready. |
See the complete list of Raya Exceptions.
Examples
import json
...
self.arms = self.enable_controller('arms')
...
right_arm_state = self.arms.get_state_of_arm('right_arm')
print(json.dumps(right_arm_state, indent=2))
...
Output
{
"name": [
"arm_right_shoulder_FR_joint",
"arm_right_shoulder_RL_joint",
"arm_right_bicep_twist_joint",
"arm_right_bicep_FR_joint",
"arm_right_elbow_twist_joint",
"arm_right_elbow_FR_joint",
"arm_right_wrist_joint"
],
"lower_limits": [
"-1.57",
"0.0",
"-1.57",
"-2.1",
"-3.14159",
"-1.5708",
"-1.57"
],
"upper_limits": [
"1.57",
"0.78",
"1.57",
"2.1",
"3.14159",
"1.5708",
"1.57"
],
"position": [
0.0007359736482612789,
3.945329808630049e-06,
0.0003977831220254302,
0.0006478230352513492,
0.0021204533986747265,
5.809607318951748e-05,
-5.764562956755981e-06
],
"velocity": [
60.0,
60.0,
60.0,
60.0,
60.0,
60.0,
60.0
],
"effort": [
NaN,
NaN,
NaN,
NaN,
NaN,
NaN,
NaN
]
}
Was this article helpful?