I’m trying to use python standalone code to simulate my customized robot. However, the initial pose of the robot is very weird and it’s really hard for me to correct it. (see below)
from omni.isaac.core import World
from omni.isaac.core.utils.stage import add_reference_to_stage, get_stage_units
from omni.isaac.core.articulations import ArticulationView
from omni.isaac.core.utils import rotations
import numpy as np
curr_path = os.path.abspath(os.path.dirname(file))
asset_path = curr_path + “/asset/WheeledTennisRobot/tennis_robot.usd” # you may change this path to the .usd file
Can you send the entire folder in WheeledTennisRobot_06?
With that said - I can also notice that when you are importing, you are adding a second level reference - you can probably make a leaner asset if you import tenis_robot_edit.usd directly.
I also realize that I saved my .usd file in another folder, why all the parts are saved in ~/Documents? I don’t even know this folder before you point it out.
Hello! I’ve had some time to work on your asset - here’s the breakdown of what I had to do to get it working:
Open tenis_robot_edit.usd
a. Remove Articulation Root from /World/tennis_robot
b. Add Articulation Root to /World/tennis_robot/chair_base
in your script, change the articulationView path to the chair_base: prim_paths_expr='/World/Robot/tennis_robot/tennis_robot/chair_base'
The reason for that is a known issue where the Articticulation Root gets automatically picked from the robot hierarchy when the Root is applied to the top level. If we manually pick the root to the desired robot link, it will use that as a base. In your asset’s case, it was picking link2, which contains a transform to the root already, so when you reset that transform to zero, it causes the entire robot to flip. That’s what was causing your robot to import rotated. Changing the base to chair_base resolves that issue, since it doesn’t contain a transform offset from the origin.
We are working to resolve that issue in the articulation Root so we can make it more robust.