@viamrobotics/motion-tools 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,10 @@ export const usePose = (name, parent) => {
|
|
|
30
30
|
const resolvedParent = $derived(parentResource?.subtype === 'arm' || parentResource?.subtype === 'gantry'
|
|
31
31
|
? `${parent()}_origin`
|
|
32
32
|
: parent());
|
|
33
|
-
const
|
|
33
|
+
const resolvedName = $derived(resource?.subtype === 'arm' || resource?.subtype === 'gantry'
|
|
34
|
+
? `${currentName}_origin`
|
|
35
|
+
: currentName);
|
|
36
|
+
const query = createResourceQuery(client, 'getPose', () => [resolvedName, resolvedParent ?? 'world', []], () => ({
|
|
34
37
|
enabled: interval !== RefetchRates.OFF && environment.current.viewerMode === 'monitor',
|
|
35
38
|
refetchInterval: interval === RefetchRates.MANUAL ? false : interval,
|
|
36
39
|
}));
|
|
@@ -55,13 +58,6 @@ export const usePose = (name, parent) => {
|
|
|
55
58
|
});
|
|
56
59
|
return {
|
|
57
60
|
get current() {
|
|
58
|
-
/**
|
|
59
|
-
* Do not return the pose of an arm or gantry because in this case the pose represents
|
|
60
|
-
* the end effector frame and not the origin frame
|
|
61
|
-
*/
|
|
62
|
-
if (resource?.subtype === 'arm' || resource?.subtype === 'gantry') {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
61
|
return pose;
|
|
66
62
|
},
|
|
67
63
|
};
|