API Reference
This page provides a comprehensive reference for all modules in the teleop_xr package.
Core Module
teleop_xr
teleop_xr
Teleop
Teleop class for controlling a robot remotely using FastAPI and WebSockets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
TeleopSettings
|
Configuration settings for the teleop server. |
required |
video_sources
|
Optional[dict[str, VideoSource]]
|
Dictionary of video sources. |
None
|
Source code in teleop_xr/__init__.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 | |
run()
Runs the teleop server. This method is blocking.
Source code in teleop_xr/__init__.py
set_pose(pose)
Set the current pose of the end-effector.
Parameters: - pose (np.ndarray): A 4x4 transformation matrix representing the pose.
stop()
subscribe(callback)
Subscribe to receive updates from the teleop module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback
|
Callable[[ndarray, dict[str, Any]], None]
|
A callback function that will be called when pose updates are received. The callback function should take two arguments: - np.ndarray: A 4x4 transformation matrix representing the end-effector target pose. - dict[str, Any]: A dictionary containing additional information. |
required |
Source code in teleop_xr/__init__.py
are_close(a, b=None, lin_tol=1e-09, ang_tol=1e-09)
Check if two transformation matrices are close to each other within specified tolerances.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
ndarray
|
The first transformation matrix. |
required |
b
|
ndarray
|
The second transformation matrix. If not provided, it defaults to the identity matrix. |
None
|
lin_tol
|
float
|
The linear tolerance for closeness. Defaults to 1e-9. |
1e-09
|
ang_tol
|
float
|
The angular tolerance for closeness. Defaults to 1e-9. |
1e-09
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the matrices are close, False otherwise. |
Source code in teleop_xr/__init__.py
interpolate_transforms(T1, T2, alpha)
Interpolate between two 4x4 transformation matrices using SLERP + linear translation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
T1
|
ndarray
|
Start transform (4x4) |
required |
T2
|
ndarray
|
End transform (4x4) |
required |
alpha
|
float
|
Interpolation factor [0, 1] |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: Interpolated transform (4x4) |
Source code in teleop_xr/__init__.py
slerp(q1, q2, t)
Spherical linear interpolation between two quaternions.
Source code in teleop_xr/__init__.py
teleop_xr.config
teleop_xr.config
teleop_xr.messages
teleop_xr.messages
Inverse Kinematics (IK)
teleop_xr.ik.controller
teleop_xr.ik.controller
IKController
High-level controller for teleoperation using IK.
This class manages the transition between idle and active teleoperation, handles XR device snapshots for relative motion, and coordinates between the robot model, IK solver, and optional output filtering.
Source code in teleop_xr/ik/controller.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
__init__(robot, solver=None, filter_weights=None)
Initialize the IK controller.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
BaseRobot
|
The robot model. |
required |
solver
|
PyrokiSolver | None
|
The IK solver. If None, step() will return current_config. |
None
|
filter_weights
|
ndarray | None
|
Optional weights for a WeightedMovingFilter on joint outputs. |
None
|
Source code in teleop_xr/ik/controller.py
compute_teleop_transform(t_ctrl_curr, t_ctrl_init, t_ee_init)
Compute the target robot pose based on XR controller motion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_ctrl_curr
|
SE3
|
Current XR controller pose. |
required |
t_ctrl_init
|
SE3
|
XR controller pose at the start of teleoperation. |
required |
t_ee_init
|
SE3
|
Robot end-effector pose at the start of teleoperation. |
required |
Returns:
| Type | Description |
|---|---|
SE3
|
jaxlie.SE3: The calculated target pose for the robot end-effector. |
Source code in teleop_xr/ik/controller.py
reset()
Resets the controller state, forcing it to re-take snapshots on the next step.
Source code in teleop_xr/ik/controller.py
step(state, q_current)
Execute one control step: update targets and solve for new joint configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
XRState
|
The current XR state from the headset. |
required |
q_current
|
ndarray
|
The current joint configuration of the robot. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: The new (possibly filtered) joint configuration. |
Source code in teleop_xr/ik/controller.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
xr_pose_to_se3(pose)
Convert an XRPose to a jaxlie SE3 object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose
|
XRPose
|
The XR pose to convert. |
required |
Returns:
| Type | Description |
|---|---|
SE3
|
jaxlie.SE3: The converted pose. |
Source code in teleop_xr/ik/controller.py
teleop_xr.ik.solver
teleop_xr.ik.solver
PyrokiSolver
Inverse Kinematics (IK) solver using Pyroki and jaxls.
This solver uses optimization (Least Squares) to find joint configurations that satisfy target poses for the robot's end-effectors and head. It leverages JAX for high-performance, JIT-compiled solving.
Source code in teleop_xr/ik/solver.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
__init__(robot)
Initialize the solver with a robot model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
BaseRobot
|
The robot model providing kinematic info and costs. |
required |
Source code in teleop_xr/ik/solver.py
solve(target_L, target_R, target_Head, q_current)
Solve the IK problem for the given targets and current configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_L
|
SE3 | None
|
Target pose for the left end-effector. |
required |
target_R
|
SE3 | None
|
Target pose for the right end-effector. |
required |
target_Head
|
SE3 | None
|
Target pose for the head. |
required |
q_current
|
ndarray
|
Current joint configuration (initial guess). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
jnp.ndarray: Optimized joint configuration. |
Source code in teleop_xr/ik/solver.py
teleop_xr.ik.robot
teleop_xr.ik.robot
BaseRobot
Bases: ABC
Abstract base class for robot models used in IK optimization.
This class defines the interface required by the IK solver and controller to compute kinematics and optimization costs.
Source code in teleop_xr/ik/robot.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
actuated_joint_names
abstractmethod
property
Get the names of the actuated joints.
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: A list of joint names. |
base_to_ros
property
Rotation from the robot base frame to the canonical ROS2 frame.
default_speed_ratio
property
Get the default teleop speed ratio for this robot.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The default speed ratio (e.g., 1.0 for 100%, 1.2 for 120%). |
joint_var_cls
abstractmethod
property
The jaxls.Var class used for joint configurations.
Returns:
| Type | Description |
|---|---|
Any
|
Type[jaxls.Var]: The variable class to use for optimization. |
orientation
property
Rotation from the robot's base frame to the canonical ROS2 frame (X-forward, Z-up).
ros_to_base
property
Rotation from the canonical ROS2 frame to the robot base frame.
supported_frames
property
Get the set of supported frames for this robot.
Returns:
| Type | Description |
|---|---|
set[str]
|
set[str]: A set of frame names (e.g., {"left", "right", "head"}). |
build_costs(target_L, target_R, target_Head, q_current=None)
abstractmethod
Build a list of costs for the robot-specific formulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_L
|
SE3 | None
|
Target pose for the left end-effector. |
required |
target_R
|
SE3 | None
|
Target pose for the right end-effector. |
required |
target_Head
|
SE3 | None
|
Target pose for the head. |
required |
q_current
|
ndarray | None
|
Current joint configuration (initial guess). |
None
|
Returns:
| Type | Description |
|---|---|
list[Cost]
|
list[Cost]: A list of jaxls Cost objects representing the optimization objectives. |
Source code in teleop_xr/ik/robot.py
forward_kinematics(config)
abstractmethod
Compute the forward kinematics for the given configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
ndarray
|
The robot configuration (e.g., joint angles) as a JAX array. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, SE3]
|
dict[str, jaxlie.SE3]: A dictionary mapping link names (e.g., "left", "right", "head") to their respective SE3 poses. |
Source code in teleop_xr/ik/robot.py
get_default_config()
abstractmethod
Get the default configuration for the robot.
Returns:
| Type | Description |
|---|---|
ndarray
|
jnp.ndarray: The default configuration as a JAX array. |
get_vis_config()
abstractmethod
Get the visualization configuration for this robot.
Returns:
| Type | Description |
|---|---|
RobotVisConfig | None
|
RobotVisConfig | None: Configuration for rendering the robot, or None if not supported. |
Note
Subclasses should use self.orientation to populate
RobotVisConfig.initial_rotation_euler.
Source code in teleop_xr/ik/robot.py
teleop_xr.ik.robots.h1_2
teleop_xr.ik.robots.h1_2
UnitreeH1Robot
Bases: BaseRobot
Unitree H1_2 robot implementation for IK.
Source code in teleop_xr/ik/robots/h1_2.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
joint_var_cls
property
The jaxls.Var class used for joint configurations.
build_costs(target_L, target_R, target_Head, q_current=None)
Build a list of Pyroki cost objects.
Source code in teleop_xr/ik/robots/h1_2.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
forward_kinematics(config)
Compute the forward kinematics for the given configuration.
Source code in teleop_xr/ik/robots/h1_2.py
Events & Logic
teleop_xr.events
teleop_xr.events
XR event system types and utilities.
This module provides enums and dataclasses for XR button events, including button identification, controller identification, and event data.
ButtonDetector
Detects complex button events (double-press, long-press) from raw button states.
Source code in teleop_xr/events.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
__init__(settings)
Initialize the ButtonDetector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
EventSettings
|
Configuration settings for event detection. |
required |
update(button, controller, is_pressed, timestamp_ms)
Update the state of a button and return any detected events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
button
|
XRButton
|
The button being updated. |
required |
controller
|
XRController
|
The controller the button belongs to. |
required |
is_pressed
|
bool
|
The current raw pressed state of the button. |
required |
timestamp_ms
|
float
|
The timestamp of the update in milliseconds. |
required |
Returns:
| Type | Description |
|---|---|
list[ButtonEvent]
|
A list of ButtonEvent objects detected during this update. |
Source code in teleop_xr/events.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
ButtonEvent
dataclass
Represents a button event with timing information.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
ButtonEventType
|
The type of button event. |
button |
XRButton
|
The button that triggered the event. |
controller |
XRController
|
The controller (left/right) that triggered the event. |
timestamp_ms |
float
|
Unix timestamp in milliseconds when the event occurred. |
hold_duration_ms |
float | None
|
Duration the button was held (for release events), or None. |
Source code in teleop_xr/events.py
ButtonEventType
Bases: str, Enum
Types of button events that can be detected.
Source code in teleop_xr/events.py
ButtonState
dataclass
Internal state for tracking a single button.
Attributes:
| Name | Type | Description |
|---|---|---|
is_pressed |
bool
|
Whether the button is currently pressed. |
press_time_ms |
float
|
Timestamp of the last press event. |
last_release_time_ms |
float
|
Timestamp of the last release event. |
long_press_fired |
bool
|
Whether a long-press event has already been fired for the current press. |
double_press_fired |
bool
|
Whether a double-press event was just fired (for debounce). |
Source code in teleop_xr/events.py
EventProcessor
Orchestrates event detection and manages subscriptions.
This class parses raw XR state dictionaries, feeds them to a ButtonDetector, and invokes registered callbacks when events are detected.
Source code in teleop_xr/events.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
__init__(settings)
Initialize the EventProcessor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
EventSettings
|
Configuration settings for event detection. |
required |
Source code in teleop_xr/events.py
on_button_down(button=None, controller=None, callback=None)
Register a callback for button down events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
button
|
XRButton | None
|
Optional button filter. If set, only events for this button trigger the callback. |
None
|
controller
|
XRController | None
|
Optional controller filter. If set, only events for this controller trigger the callback. |
None
|
callback
|
Callable[[ButtonEvent], None] | None
|
The function to call when the event occurs. |
None
|
Source code in teleop_xr/events.py
on_button_up(button=None, controller=None, callback=None)
Register a callback for button up events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
button
|
XRButton | None
|
Optional button filter. |
None
|
controller
|
XRController | None
|
Optional controller filter. |
None
|
callback
|
Callable[[ButtonEvent], None] | None
|
The function to call when the event occurs. |
None
|
Source code in teleop_xr/events.py
on_double_press(button=None, controller=None, callback=None)
Register a callback for double press events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
button
|
XRButton | None
|
Optional button filter. |
None
|
controller
|
XRController | None
|
Optional controller filter. |
None
|
callback
|
Callable[[ButtonEvent], None] | None
|
The function to call when the event occurs. |
None
|
Source code in teleop_xr/events.py
on_long_press(button=None, controller=None, callback=None)
Register a callback for long press events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
button
|
XRButton | None
|
Optional button filter. |
None
|
controller
|
XRController | None
|
Optional controller filter. |
None
|
callback
|
Callable[[ButtonEvent], None] | None
|
The function to call when the event occurs. |
None
|
Source code in teleop_xr/events.py
process(pose, xr_state_dict)
Process XR state and trigger events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose
|
ndarray
|
The 4x4 transformation matrix (unused, for Teleop.subscribe compatibility). |
required |
xr_state_dict
|
dict
|
The raw XR state dictionary. |
required |
Source code in teleop_xr/events.py
EventSettings
dataclass
Configuration settings for event detection.
Attributes:
| Name | Type | Description |
|---|---|---|
double_press_threshold_ms |
float
|
Maximum time between presses to count as double-press. |
long_press_threshold_ms |
float
|
Minimum hold time to count as long-press. |
Source code in teleop_xr/events.py
XRButton
Bases: str, Enum
XR controller button identifiers following xr-standard gamepad mapping.
Source code in teleop_xr/events.py
XRController
button_index_to_enum(index)
Convert xr-standard gamepad button index to XRButton enum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index
|
int
|
Button index from xr-standard gamepad (0-6). |
required |
Returns:
| Type | Description |
|---|---|
XRButton | None
|
Corresponding XRButton enum value, or None if index is invalid. |
Source code in teleop_xr/events.py
Video & Cameras
teleop_xr.video_stream
teleop_xr.video_stream
teleop_xr.camera_views
teleop_xr.camera_views
build_camera_views_config(head=None, wrist_left=None, wrist_right=None, extra_streams=None)
Inputs are optional device specs (int/str/None)
Returns dict with keys for provided values only: 'head', 'wrist_left', 'wrist_right', and any extras
Each entry is { "device":
Source code in teleop_xr/camera_views.py
build_video_streams(camera_views)
Returns { "streams": [{"id":
Source code in teleop_xr/camera_views.py
Visualization
teleop_xr.robot_vis
teleop_xr.robot_vis
RobotVisModule
Module for serving robot visualization assets (URDF, meshes) and broadcasting state.
Source code in teleop_xr/robot_vis.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
broadcast_state(connection_manager, joints)
async
Broadcasts the current joint state to all connected clients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_manager
|
Any
|
The ConnectionManager instance from Teleop class. |
required |
joints
|
Dict[str, float]
|
Dictionary mapping joint names to values (radians/meters). |
required |
Source code in teleop_xr/robot_vis.py
Utilities
teleop_xr.utils.filter
teleop_xr.utils.filter
teleop_xr.utils.transform_limiter
teleop_xr.utils.transform_limiter
apply_twist(T, v, w, dt=1.0)
Apply twist (v, w) to transformation T over time dt.
Source code in teleop_xr/utils/transform_limiter.py
se3_to_twist(T1, T2)
Compute linear and angular velocity from T1 to T2.