Nested Reference Frame Configuration
Imagine a robotic arm is attached to the actuator (moving part) of a gantry.
Consider the point that the gantry itself is fixed to as the center of the world
, making the gantry’s origin the same as the world
origin: (0, 0, 0)
.
Measure from that point to the base of the arm to get the translation
of the arm.
- Suppose the base of the arm is mounted to the gantry 100mm above the gantry’s origin.
- Supply this
translation
and specify the arm’sparent
reference frame asmyGantry
. - Leave all other frames’
orientation
andtranslation
at their default values.
Now, as the gantry moves its actuator, the Frame System will translate both the gantry and the arm’s location according to that motion.
To complete the frame configuration for your robot following this example, navigate to the Config tab on your robot’s page in the Viam app, select the Builder mode, scroll to myGantry
’s card, and click Add Frame:
Select the parent
frame as world
and fill in the coordinates for translation
(mm) and orientation
(deg) according to the position and orientation of the gantry in relation to the world
frame’s origin.
Navigate to myArm
’s card and click Add Frame:
Select the parent
frame as myGantry
and fill in the coordinates for translation
(mm) and orientation
(deg) according to the position and orientation of the arm in relation to the myGantry
frame’s origin.
{
"components": [
{
"name": "myGantry",
"type": "gantry",
"model": "oneaxis",
"attributes": {},
"depends_on": [],
"frame": {
"parent": "world",
"translation": {
"y": 0,
"z": 0,
"x": 0
},
"orientation": {
"type": "ov_degrees",
"value": {
"x": 0,
"y": 0,
"z": 1,
"th": 0
}
}
}
},
{
"depends_on": [],
"name": "myArm",
"type": "arm",
"model": "ur5e",
"attributes": {
"host": "127.0.0.1"
},
"frame": {
"parent": "myGantry",
"translation": {
"x": 0,
"y": 0,
"z": 100
},
"orientation": {
"type": "ov_degrees",
"value": {
"x": 0,
"y": 0,
"z": 1,
"th": 0
}
}
}
}
]
}
Parameter | Inclusion | Required |
---|---|---|
Parent | Required | Default: world . The name of the reference frame you want to act as the parent of this frame. |
Translation | Required | Default: (0, 0, 0) . The coordinates that the origin of this component’s reference frame has within its parent reference frame.Units: mm. |
Orientation | Required | Default: (0, 0, 1), 0 . The orientation vector that yields the axes of the component’s reference frame when applied as a rotation to the axes of the parent reference frame.Types: Orientation Vector Degrees , Orientation Vector Radians , and Quaternion . |
Geometry | Optional | Default: none . Collision geometries for defining bounds in the environment of the robot.Types: Sphere , Box , and Capsule . |
Tip
Note: myGantry
uses the default translation and orientation from the world
origin, and myArm
uses the default orientation.
You do not have to explicitly configure this on your robot, as it is the default. It is included as part of this example for illustrative purposes.
Have questions, or want to meet other people working on robots? Join our Community Discord.
Was this page helpful?
Glad to hear it! If there is anything we could be doing better, please create an issue.
We're sorry about that. If you'd like to talk to us for help, please join the Community Discord. To ensure we know what's wrong with this page, you can also open an issue.