Open M1chaelM opened 1 year ago
Looks like the problem may just be that the way we check for world names to bridge in vrx_gz/launch.py
is to use whatever is passed in as the argument to the world
parameter and see whether it's in our list of worlds we know about. This means our bridges only work if the world files are named correctly (i.e. the same file with a different name will fail), so we can't handle any variation in file names or paths, let alone dynamically generated names.
We could make this approach a little more robust by normalizing the path strings a bit before we do our matching, but it seems like the decision about what to bridge should actually be made based what plugins are included in the sdf.
In the long term, I think it would be even better if we had a way of indicating whether a gz topic should be advertised as available for bridging when we publish it, and then a ROS side process that picks up a list of bridgeable topics and decides whether to create the bridge for them.
I gave this a shot while working on the wind plugin. Looks good now - all topics are publishing when I run directly on my machine with the example you posted.
It turns out that #682 only fixed bridges for some topics, but task-specific bridges are still not being created. For example, running:
ros2 launch vrx_gz competition.launch.py world:=`pwd`/stationkeeping0
causes the following topics to fail to bridge to the ROS 2 side:
/vrx/stationkeeping/goal
/vrx/stationkeeping/mean_pose_error
/vrx/stationkeeping/pose_error
I believe this is also the reason our ghost ship is not currently showing expected behavior for the perception task in https://github.com/osrf/vrx-docker/pull/60
This is happening because we need to pass the base name of the world to our competition_bridges
function in vrx_gz/launch.py
, and we are currently still passing the full path. It should be resolved with PR #688
how can i do while 20.04 ubuntu and ros-noetic???
@FangLian9101 You have two options:
First, if you are not participating in the competition and just want to work with the VRX environment, you can use VRX Classic (see the Wiki for instructions on how to get started).
If you want to run the current version of VRX (Gazebo Garden, ROS2 Humble) but use existing ROS1 code, you can run VRX in a docker container and use a ROS1 bridge. This can be a little tricky to set up but is possible: see the example here for some help getting started.
Describe the bug When launching the VRX competition with an argument such as
world:=/full/path/to/stationkeeping_task
the world seems to launch but many topics are not published. On the ROS side, I get:This is a problem because to run our competition we rely on the ability to specify the path of world files that are not installed in the install directory.
Expected behavior I expect to see at least the following topics:
To Reproduce List the steps to reproduce the problem:
ros2 launch vrx_gz competition.launch.py world:=`pwd`/src/vrx/vrx_gz/worlds/stationkeeping_task
System Configuration: Tell us about your system.
Additional notes It looks like the first sign of error output is
This is followed shortly by