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

WAM-V joystick teleoperation #503

Merged
merged 22 commits into from
Sep 9, 2022
Merged

WAM-V joystick teleoperation #503

merged 22 commits into from
Sep 9, 2022

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Aug 30, 2022

Requires:

This pull request adds the ability to teleoperate the WAM-V, which I think it's very useful for testing scoring plugins.

As a reminder, you need a Logitech F310 controller with the back switch in D mode.

How to test it?

Launch the simulation:

ros2 launch vrx_ros competition_local.launch.py ign_args:="-v 4 -r sydney_regatta.sdf"

Launch the WAM-V:

ros2 launch vrx_ign spawn.launch.py name:=wamv world:=sydney_regatta model:=wam-v x:=-532 y:=162 z:=0 R:=0 P:=0 Y:=1

Launch the usv_joy_teleop launch file:

ros2 launch vrx_ign usv_joy_teleop.py

To control the WAM-V you have to keep the L1 button pressed (deadman button). Other than that, the controls are the same that we used to have. The ball shooter is not installed in the WAM-V but you can confirm that the message is sent by echoing the /wamv/shooters/ball_shooter/fire topic while you pressed the A button.

ros2 topic echo /wamv/shooters/ball_shooter/fire
data: true
---

Note: I think that the joy_teleop package is still not polished enough to be used with ROS2. As far as I know it's not possible to configure it without a deadman button, which I think it's a bug.

Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
@M1chaelM
Copy link
Collaborator

M1chaelM commented Sep 2, 2022

@caguero it looks like testing this PR currently requires building gazebosim from source. Is that right? I see you've merged #1681 but I'm not sure how long this change takes to propagate to the binaries.

Edit: Sorry, disregard the above. After installing the latest updates, wiping out the workspace and rebuilding I've been able to get this running with the thrusters.

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.

This seems to be working as I would expect. A minor caveat is that the thrusters seem more powerful than I remember. For example, by switching from full-forward to full-back, I can stop almost instantly. I can also spin fast in a tight circle, then reverse to spin in the opposite direction with very little transition time. I don't think this is necessarily a problem but it does seem different. Maybe it's a result of not having any of the components on the wamv yet?

@caguero
Copy link
Contributor Author

caguero commented Sep 5, 2022

This seems to be working as I would expect. A minor caveat is that the thrusters seem more powerful than I remember. For example, by switching from full-forward to full-back, I can stop almost instantly. I can also spin fast in a tight circle, then reverse to spin in the opposite direction with very little transition time. I don't think this is necessarily a problem but it does seem different. Maybe it's a result of not having any of the components on the wamv yet?

This is intended because I set 1000 as the scale in the wamv.yaml. I thought it would be handy for testing but let me know if that was too much.

@caguero caguero changed the base branch from caguero/scoring_plugin to gazebosim September 9, 2022 00:04
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
@caguero caguero merged commit 62ccdf6 into gazebosim Sep 9, 2022
@caguero caguero deleted the caguero/teleop branch September 9, 2022 13:54
@M1chaelM M1chaelM mentioned this pull request Sep 13, 2022
14 tasks
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