There is nothing wrong with the environment. You just have to publish to that topic because when the robot is stopped, it doesn’t appear in ros2 topic list because it is not moving. As soon as you publish to /cmd_vel you’ll see it move
Thanks both of you. It seems I need to improve my understanding of ros topics!
How could I have checked that the robot would listen to the topic /cmd_vel?
I disagree with with @roalgoal. There can and are topics which have no publishers and still are available. It is not possible to publish to a topic that is not available.
There is a /cmd_vel topic, but remember that the robot uses ROS1!! Rosbridge will take care of communication between ROS and ROS2 when the topics are sent -that is why roalgoal’s advice works! But it is not a topic waiting to be published to in order to show itself, it is a topic in the ROS1 dimension)-. It would be cool if in future updates ros2 topic list also prints the topics available through Rosbridge (with the specification that those are ROS1 topics).
You are right @GasPatxo, it is not possible to publish to a topic that is not available. cmd_vel is always available in ROS in this case.
I think the reason why the topic does not appear with introspection is that because the ros1_bridge has not established a connection with the topic in ROS since no messages have passed through, especially if the bridge is launched without --bridge-all-topics