Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

[bug] ImportError: cannot import name 'OrderedDict' when debugging ROS2 in Jetson Container #620

@polyhobbyist

Description

@polyhobbyist

(Please add appropriate labels)

  • Windows: (Version)
  • Linux: (Dist/Version)
  • ROS 1: Dist
  • ROS 2: Foxy

<Version of the plugin> 0.7.0

Repro steps

Create a dockerfile which derives from dustynv/ros:foxy-slam-l4t-r32.5.0, with a docker-compose which instantiates it like:

version: '3.4'

services:
  mulews:
    image: ws
    network_mode: "host"
    volumes:
      - ~/ws:/ws
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /dev/i2c-1:/dev/i2c-1
      - /dev/bus/usb:/dev/bus/usb
      - /dev/ttyTHS1:/dev/ttyTHS1
    build:
      context: .
      dockerfile: ./Dockerfile
    command: /bin/sh -c "while sleep 1000; do :; done"

expected behavior

Attempt to debug a ROS2 launch file.

Traceback (most recent call last):
  File "/root/.vscode-server/extensions/ms-iot.vscode-ros-0.6.9/assets/scripts/ros2_launch_dumper.py", line 16, in <module>
    from typing import OrderedDict
ImportError: cannot import name 'OrderedDict'

the nvidia containers have an older version of python, which isn't typical:

python --version
Python 3.6.9

Therefore OrderedDict is not in the typing module. It is in the collections module.

To support Jetson container deployments, suggest using a switch to support both?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions