RussTedrake / manipulation

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

Connection Issue with `Multiplexer` and `InputPort` in Local Environment #307

Closed jc-bao closed 6 months ago

jc-bao commented 6 months ago

Description: I encountered an error related to Multiplexer and InputPort when running the 02_hardware_station_io.ipynb notebook locally, though it functions correctly in Deepnote. Below is the problematic code snippet along with the error message:

Code Snippet:

scenario_data = """
directives:
- add_directives:
    file: package://manipulation/clutter.dmd.yaml
model_drivers:
    iiwa: !IiwaDriver
      hand_model_name: wsg
    wsg: !SchunkWsgDriver {}
"""
scenario = LoadScenario(data=scenario_data)
station = MakeHardwareStation(scenario, meshcat=meshcat)
context = station.CreateDefaultContext()

station.GetInputPort("wsg.position").FixValue(context, [0.1])
station.ForcedPublish(context) # Error occurs on this line

Error Message:

RuntimeError: InputPort::Eval(): required InputPort[0] (u0) of System ::station::IiwaDriver(iiwa)::velocity_interpolator::drake/systems/Multiplexer@000000017a50aad0 (Multiplexer<double>) is not connected

Environment Details:

Question: Could this issue be due to version incompatibility between Manipulation and Drake? Any insights or solutions would be greatly appreciated!

RussTedrake commented 6 months ago

I believe this was the same issue as #308, which I've just addressed. The notebooks uploaded on Deepnote were stale. I hope this fixes it!