-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Description
urdf
# URDF path for Go2 robot
_GO2_URDF = Path(__file__).parent.parent / "go2" / "go2.urdf"
# Load robot URDF
if _GO2_URDF.exists():
rr.log_file_from_path(
str(_GO2_URDF),
entity_path_prefix="world/robot",
static=True,
)
logger.info(f"Loaded URDF from {_GO2_URDF}")this was done because foxglove is dumb and won't let me draw a box in 3d
with rerun you can, so no need for this fake box urdf, just draw the box.
TF module
idk why we have in blueprints:
tf_rerun(), # Auto-visualize all TF transforms in Rerunbut then we build/vis all the transforms manually
# Log camera transform (compose base_link -> camera_link -> camera_optical)
# transforms[1] is camera_link, transforms[2] is camera_optical
cam_tf = transforms[1] + transforms[2] # compose transforms
rr.log(
"world/robot/camera",
rr.Transform3D(
translation=[cam_tf.translation.x, cam_tf.translation.y, cam_tf.translation.z],
rotation=rr.Quaternion(
xyzw=[
cam_tf.rotation.x,
cam_tf.rotation.y,
cam_tf.rotation.z,
cam_tf.rotation.w,
]
),
),
)
# Log to Rerun: robot pose (relative to parent entity "world")
rr.log(
"world/robot",
rr.Transform3D(
translation=[msg.x, msg.y, msg.z],
rotation=rr.Quaternion(
xyzw=[
msg.orientation.x,
msg.orientation.y,
msg.orientation.z,
msg.orientation.w,
]
),
),
)
# Log axes as a child entity for visualization
rr.log("world/robot/axes", rr.TransformAxes3D(0.5)) # type: ignore[attr-defined]we can't do any of this stuff in go2 connection.
at most (if not using a rerun tf module) it should be this:
self.tf.publish(*transforms)
for transform in transforms:
rr.log(.... transform.to_rerun())actual rerun transform module should be similar to above also..
never build objects manually that are equivalent to dimos objects - create to_rerun() methods
camera image distortion
camera image needs to be logged under a projection so that it takes camerainfo distortion into account
tf module
self._lcm = LCM()
self._lcm.start()
topic = Topic("/tf", TFMessage)
too much vibing, you need to understand things, and ask if you don't understand
we have self.tf module for transforms, don't touch lcm directly
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels