Open mikelasa opened 3 months ago
Where did you create the frame transformer sensor? Did you do it after the sim.reset()
call?
Hi,
Is before env.reset()
is called, I first create the ManagerBasedEnv and the call the reset. Also note that I have a contact sensor that is working well if it helps:
@configclass
class TableTopSceneCfg(InteractiveSceneCfg):
"""Configuration for a cart-pole scene."""
# ground plane
# lights
# mount
# Set Cube as object
# contact sensor
#frame transformer
ee_pad_frame_transformer_cfg = FrameTransformerCfg(
#prim_path="/World/envs/env_0/Bin",
#prim_path="{ENV_REGEX_NS}/Bin"
prim_path="/World/envs/env_0/Robot1/panda_link0",
debug_vis=False,
target_frames=[
FrameTransformerCfg.FrameCfg(prim_path="/World/envs/env_0/Robot1/panda_link7",
name="pad_ee1_transform")
#FrameTransformerCfg.FrameCfg(prim_path="/World/envs/env_0/Robot2/rectangular_pad",
#name="pad_ee2_transform"),
],
visualizer_cfg=VisualizationMarkersCfg(
prim_path="/Visuals/ObjectFrameTransformer",
markers={
"frame_ee1_pad": sim_utils.UsdFileCfg(
usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/UIElements/frame_prim.usd",
scale=(0.1, 0.1, 0.1),
)
}
)
)
ee_pad_frame_transformer = FrameTransformer(ee_pad_frame_transformer_cfg)
Then goes the env:
@configclass
class BimanualLiftPressEnvCfg(ManagerBasedEnvCfg):
"""Configuration for the lifting environment."""
# Scene settings
scene: TableTopSceneCfg = TableTopSceneCfg(num_envs=2, env_spacing=2.5)
# Basic settings
observations: ObservationsCfg = ObservationsCfg()
actions: ActionsCfg = ActionsCfg()
events: EventCfg = EventCfg()
def __post_init__(self):
"""Post initialization."""
# camera settings
self.viewer.eye = [2.86341, 2.03233, 1.67289]
# general settings
self.decimation = 4
self.episode_length_s = 5.0
# simulation settings
self.sim.dt = 0.001 # 1KHz
Finally the main:
def main():
# parse the arguments
env_cfg = BimanualLiftPressEnvCfg()
env_cfg.scene.num_envs = args_cli.num_envs
# setup base environment
env = ManagerBasedEnv(cfg=env_cfg)
obs, _ = env.reset()
Hello, I started doing a simple version of a transformer from my robot link0 to the link7 following the
run_frame_tutorial.py
. I created aFrameTransformerCfg
which takes the link0 as source and link 7 as target and tried to create the actual FrameTransformer with it (This transformer is located into my classTableTopSceneCfg(InteractiveSceneCfg)
interactive scene):Commenting out
ee_pad_frame_transformer = FrameTransformer(ee_pad_frame_transformer_cfg)
I'm able to launch the simulation and see in Visuals the created "ObjectFrameTransformer" and also the visualization of the frame in the end effector (attached image). The moment I try to create the transformer sensor with this configuration I have the following error which I guess is related to isaac sim? (I dont understand the error very well):My goal is to use the
FrameTransformer
to compute the transformation from an object in the scene to both end effectors I have. I'm aware of the note telling that this function is meant to be used within an articulation. There is a possibility of achieving my goal using this class or should I do the computations by myself? (attached a sketch)