Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #641 #669

Merged
merged 5 commits into from
Jun 21, 2023
Merged

Fix issue #641 #669

merged 5 commits into from
Jun 21, 2023

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Jun 6, 2023

See issue #641.

The problem was our well known Gazebo "feature" that eliminates fixed joints when converting from URDF to SDF. Then, the pinger link disappeared. I converted the fixed joint into a revolute joint with no movement to bypass the problem.

How to test it?

  • Launch the simulation as usual:
ros2 launch vrx_gz competition.launch.py world:=sydney_regatta
  • Look at the WAMV in the entity tree and verify that there is a "pinger" listed. If you select the pinger link, you should observe a tiny sphere between the two pontoons as I enabled a small visual for reference.

  • Additionally, if you comment out the line 221 in wamv_gazebo.urdf.xacro:

<xacro:wamv_pinger name="pinger" position="-528 191 -2.0" />

You shouldn't see the pinger link in the WAMV entity tree and the functionality of the pinger won't be available (gz topic -l shouldn't report the topic /wamv/pingers/pinger/range_bearing).

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero caguero requested review from M1chaelM and j-herman June 6, 2023 15:40
@M1chaelM
Copy link
Collaborator

@caguero This seems to be working but there is a little quirk where even though gz topic -l doesn't show /wamv/pingers/ping/range_bearing, ros2 topic list still includes it:

/clock
/parameter_events
/rosout
/tf
/tf_static
/vrx/contacts
/vrx/debug/wind/direction
/vrx/debug/wind/speed
/vrx/task/info
/wamv/pingers/pinger/range_bearing
/wamv/pingers/pinger/set_pinger_position
/wamv/pose
...

If I try to echo it I get nothing, so maybe it's ok?

@caguero
Copy link
Contributor Author

caguero commented Jun 21, 2023

@caguero This seems to be working but there is a little quirk where even though gz topic -l doesn't show /wamv/pingers/ping/range_bearing, ros2 topic list still includes it

I just tweaked the code to not advertise the ROS 2 topic if the pinger isn't present. 6bfcbbc

Copy link
Collaborator

@M1chaelM M1chaelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this last change I'm seeing that the range_bearing topic is no longer advertised on the ROS side, but also that set_pinger_position is not advertised on either side (i.e. nothing related to the pinger shows up in either gz topic -l or ros2 topic list). This seems good to me for now. If we ever extend to multiple vehicles we may want to revisit (and maybe figure out a way to differentiate the transmitting pinger from the receiving pinger).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants