RussTedrake / manipulation

Course notes for MIT manipulation class
BSD 3-Clause "New" or "Revised" License
411 stars 121 forks source link

Visualize robot positions in HardwareStationInterface #324

Closed siddancha closed 1 month ago

siddancha commented 2 months ago

Problem

Slack thread: https://drakedevelopers.slack.com/archives/C2CK4CWE7/p1720146312718089

When using MakeHardwareStation(meshcat, hardware=True) , _MakeHardwareStationInterface(meshcat) completely ignores its meschat. However, a strong use-case when running real robot hardware is to run Meshcat and visualize robot positions.

It seems that a (partial) solution was previously implemented, but was commented out.

Solution

Philosophy: When the user passes a meshcat instance when running on real hardware, we assume that the user wants to visualize robot positions using this instance. In this case, the relevant systems are added to the station and wired appropriately (see below). When meshcat=None, these are not added.

System diagrams

The following system diagrams were generated from manipulation/test/test_hardware_station_interface.py:


HardwareStationInterface when meshcat=None


HardwareStationInterface when a meshcat instance is passed by the user


This change is Reviewable