import_custom_robot
Helper script to download BEHAVIOR-1K dataset and assets.
add_sensor(stage, root_prim, sensor_type, link_name, parent_link_name=None, pos_offset=None, ori_offset=None)
Adds sensor to robot. This is an in-place operation on @root_prim
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage
|
Stage
|
Current active omniverse stage |
required |
root_prim
|
Prim
|
Root prim of the current robot, assumed to be on the current stage |
required |
sensor_type
|
str
|
Sensor to create. Valid options are: {Camera, Lidar, VisualSphere} |
required |
link_name
|
str
|
Link to attach the created sensor prim to. If this link does not already exist in the robot's current set of links, a new one will be created as a child of @parent_link_name's link |
required |
parent_link_name
|
None or str
|
If specified, parent link from which to create a new child link @link_name. If set, @link_name should NOT be a link already found on the robot! |
None
|
pos_offset
|
None or 3 - tuple
|
If specified, (x,y,z) local translation offset to apply. If @parent_link_name is specified, defines offset of @link_name wrt @parent_link_name If only @link_name is specified, defines offset of the sensor prim wrt @link_name |
None
|
ori_offset
|
None or 3 - tuple
|
If specified, (x,y,z,w) quaternion rotation offset to apply. If @parent_link_name is specified, defines offset of @link_name wrt @parent_link_name If only @link_name is specified, defines offset of the sensor prim wrt @link_name |
None
|
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
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 | |
create_curobo_cfgs(robot_prim, robot_urdf_path, curobo_cfg, root_link, save_dir, is_holonomic=False)
Creates a set of curobo configs based on @robot_prim and @curobo_cfg
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_prim
|
Prim
|
Top-level prim defining the robot in the current USD stage |
required |
robot_urdf_path
|
str
|
Path to robot URDF file |
required |
curobo_cfg
|
Dict
|
Dictionary of relevant curobo information |
required |
root_link
|
str
|
Name of the robot's root link, BEFORE any holonomic joints are applied |
required |
save_dir
|
str
|
Path to the directory to save generated curobo files |
required |
is_holonomic
|
bool
|
Whether the robot has a holonomic base applied or not |
False
|
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
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 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | |
create_rigid_prim(stage, link_prim_path)
Creates a new rigid link prim nested under @root_prim
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage
|
Stage
|
Current active omniverse stage |
required |
link_prim_path
|
str
|
Prim path at which link will be created. Should not already exist on the stage |
required |
Returns:
| Type | Description |
|---|---|
Prim
|
Newly created rigid prim |
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
find_articulation_root_prim(root_prim)
Recursively searches children of @root_prim to find the articulation root
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_prim
|
Prim
|
Root prim to search |
required |
Returns:
| Type | Description |
|---|---|
None or Prim
|
If found, articulation root prim |
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
find_prim_with_name(name, root_prim)
Recursively searches children of @root_prim to find first instance of prim including string @name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the prim to search |
required |
root_prim
|
Prim
|
Root prim to search |
required |
Returns:
| Type | Description |
|---|---|
None or Prim
|
If found, first prim whose prim name includes @name |
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
make_joint_fixed(stage, root_prim, joint_name)
Converts a revolute / prismatic joint @joint_name into a fixed joint
NOTE: This is an in-place operation!
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage
|
Stage
|
Current active omniverse stage |
required |
root_prim
|
Prim
|
Root prim of the current robot, assumed to be on the current stage |
required |
joint_name
|
str
|
Joint to convert to be fixed |
required |
Source code in OmniGibson/omnigibson/examples/robots/import_custom_robot.py
set_link_collision_approximation(stage, root_prim, link_name, approximation_type)
Sets all collision geoms under @link_name to be @approximation type Args: approximation_type (str): approximation used for collision. Can be one of: {"none", "convexHull", "convexDecomposition", "meshSimplification", "sdf", "boundingSphere", "boundingCube"} If None, the approximation will use the underlying triangle mesh.