Skip to content

ROS1 autocomplete for interactive container not working #760

@jmehami1

Description

@jmehami1

Hi, I have been running ROS1 containers on two different computers with OSs Ubuntu 22.04 and Ubuntu 20.04 to avoid local installations. I start the containers interactively using the following command on both systems:
docker run -it --rm --network host osrf/ros:noetic-desktop-full

I'm assuming the script ros_entrypoint.sh sources the setup.bash file when container is started. I try to type and autocomplete ROS commands. For example, when I type "ros" and press TAB I find all the relevant ROS commands.

The issue appears when finding subcommands. For example, If I want to run the rosbag command and I want to see its subcommands, they do not appear when I press TAB and instead directories are shown as follows:
image

In order to fix this I have to source the setup.bash script as follows:
source /opt/ros/noetic/setup.bash
After sourcing the setup.bash script, I can now see the subcommands when autocompleting with TAB as follows:
image

Why do I have to source the setup.bash script after the ros_entrypoint.sh has already carried out the command.

The ros_entrypoint.sh is as follows:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions