-
Hi all, Previously, I was able to find the body named "link_tcp" using self._robot.find_bodies("link_tcp")[0][0] with the older URDF exporter. However, in the current setup (latest version), "link_tcp" is defined as a <fixed_frame> with a parent link "link_base", and it does not appear in the list of available bodies.
|
Beta Was this translation helpful? Give feedback.
Answered by
jo-choi
May 8, 2025
Replies: 1 comment
-
Solved. For those using DirectRLEnv, here's how I set up the tcp frame: class EnvCfg(DirectRLEnvCfg):
robot: ArticulationCfg = DG_CFG.replace( # type: ignore
prim_path="/World/envs/env_.*/Robot",
)
tcp_frame = FrameTransformerCfg(
prim_path="/World/envs/env_.*/Robot/link_0",
debug_vis=False,
target_frames=[
FrameTransformerCfg.FrameCfg(
prim_path="/World/envs/env_.*/Robot/link_dg_base",
name="link_tcp",
offset=OffsetCfg(
pos=(0.0, 0.0, 0.22),
rot=(1, 0, 0, 0),
),
),
],
)
def _setup_scene(self):
self._tcp_frame = FrameTransformer(self.cfg.tcp_frame)
self.scene.sensors["tcp_frame"] = self._tcp_frame
# In the training loop:
tcp_frame_data = self._tcp_frame.data Hope this helps someone running into the same issue! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jo-choi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved.
For those using DirectRLEnv, here's how I set up the tcp frame: