Edge Software Catalog
Support for issues related to Edge Software Catalog
442 Discussions

Ros2 topic <any subcommand> returns invalid command error

ChrisMatthieu
Employee
1,414 Views

I just installed the latest Robotics SDK on Windows 11 WSL2 running Ubuntu.  Everything seemed to install correctly.

 

I ran:

 

source /opt/ros/humble/setup.bash 

ros2 topic list

 

and got the following error:

 

usage: ros2 [-h] [--use-python-default-buffering] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: argument Call `ros2 <command> -h` for more detailed usage.: invalid choice: 'topic' (choose from 'control', 'daemon', 'extension_points', 'extensions', 'node', 'param', 'pkg', 'run', 'service')

 

When I run: ros2 -h

 

Returns:

ros2 is an extensible command-line tool for ROS 2.

options:
-h, --help show this help message and exit
--use-python-default-buffering
Do not force line buffering in stdout and instead use the python default buffering, which
might be affected by PYTHONUNBUFFERED/-u and depends on whatever stdout is interactive or not

Commands:
control Various control related sub-commands
daemon Various daemon related sub-commands
node Various node related sub-commands
param Various param related sub-commands
pkg Various package related sub-commands
run Run a package specific executable
service Various service related sub-commands

Call `ros2 <command> -h` for more detailed usage.

 

Notice: There is no topic listed in available commands.

Have you seen this error before?  No matter what subcommand (even pub) that I issue ros2 topic, ros complains that the command topic is invalid.

 

0 Kudos
1 Solution
ChrisMatthieu
Employee
1,355 Views

I reinstalled ros humble and my issue is now resolved.

View solution in original post

0 Kudos
4 Replies
ChrisMatthieu
Employee
1,412 Views

ros2 launch commands returns the same error.

0 Kudos
ChrisMatthieu
Employee
1,392 Views

Turtlesim runs fine but still cannot run ros2 topic list on another window.

 

Same error: 

 

ros2 topic list
usage: ros2 [-h] [--use-python-default-buffering] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: argument Call `ros2 <command> -h` for more detailed usage.: invalid choice: 'topic' (choose from 'control', 'daemon', 'extension_points', 'extensions', 'node', 'param', 'pkg', 'run', 'service')

0 Kudos
ChrisMatthieu
Employee
1,356 Views

I reinstalled ros humble and my issue is now resolved.

0 Kudos
Iffa_Intel
Moderator
1,342 Views

Hi,


Glad to know that your issue is solved.

Intel will no longer monitor this thread. If you need any additional information from Intel, please submit a new question. 



Cordially,

Iffa


0 Kudos
Reply