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

Scan, dock and deliver practice worlds #591

Merged
merged 17 commits into from
Apr 21, 2023

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Feb 11, 2023

How to test it?

You can launch the three practice worlds with:

ros2 launch vrx_gz competition.launch.py world:=practice_2022_scan_dock_deliver0_task
ros2 launch vrx_gz competition.launch.py world:=practice_2022_scan_dock_deliver1_task
ros2 launch vrx_gz competition.launch.py world:=practice_2022_scan_dock_deliver1_task

Verify that the robotx color sequences are red-green-yellow, yellow-blue-red and yellow-red-green respectively.

Verify that you can see a red_rectangle, yellow_circle and a yellow_triangle respectively in one of the placards. The other placard symbols are not that relevant.

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero
Copy link
Contributor Author

caguero commented Mar 15, 2023

@M1chaelM , the environmental conditions have been updated. This PR is ready for review.

@M1chaelM
Copy link
Collaborator

I cannot fire the ball shooter using the "A" button. Is this a known deficiency?

@M1chaelM
Copy link
Collaborator

Color sequences and placards look good, and I'm able to score points docking the correct bay and reporting the correct color sequence.

I'm not sure how to fire the ball shooter. Running:

ros2 topic pub /wamv/shooters/ball_shooter/fire --once std_msgs/msg/Bool data:\ false\

returns the following repeated message:

Waiting for at least 1 matching subscription(s)...
Waiting for at least 1 matching subscription(s)...
Waiting for at least 1 matching subscription(s)...
...

Looking through the output of ros2 topic list, I find:

/wamv/shooters/ball_shooter/fire

but there does not seem to be any analogous topic listed in the output of gz topic -l.

@M1chaelM M1chaelM added this to the 2.1.0 milestone Apr 20, 2023
Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero
Copy link
Contributor Author

caguero commented Apr 20, 2023

Color sequences and placards look good, and I'm able to score points docking the correct bay and reporting the correct color sequence.

I'm not sure how to fire the ball shooter. Running:

ros2 topic pub /wamv/shooters/ball_shooter/fire --once std_msgs/msg/Bool data:\ false\

returns the following repeated message:

Waiting for at least 1 matching subscription(s)...
Waiting for at least 1 matching subscription(s)...
Waiting for at least 1 matching subscription(s)...
...

Looking through the output of ros2 topic list, I find:

/wamv/shooters/ball_shooter/fire

but there does not seem to be any analogous topic listed in the output of gz topic -l.

I think I fixed the ball shooter. The bridge wasn't properly created.

You can launch the ball now with:

ros2 topic pub --once /wamv/shooters/ball_shooter/fire std_msgs/Empty

@caguero
Copy link
Contributor Author

caguero commented Apr 20, 2023

I think I know what's going on with the keypad, I'll fix it after the release.

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero
Copy link
Contributor Author

caguero commented Apr 20, 2023

I think I know what's going on with the keypad, I'll fix it after the release.

Never mind, I also restored the ability to launch the ball with the keypad. If you do it programmatically, it should now be:

ros2 topic pub /wamv/shooters/ball_shooter/fire --once std_msgs/msg/Bool data:\ false\

@M1chaelM
Copy link
Collaborator

OK, I'm able to score 10 points for hitting the small target, but not getting anything for the large target even when I've definitely hit it:
hit_large_no_points

I hit it 3-4 times, but the "Hit target!" message does not display to the console and the score doesn't change. Maybe the scoring plugin bounding boxes are not in the right place?

@caguero
Copy link
Contributor Author

caguero commented Apr 21, 2023

I hit it 3-4 times, but the "Hit target!" message does not display to the console and the score doesn't change. Maybe the scoring plugin bounding boxes are not in the right place?

Hmm, the activation areas look correct.

Screenshot from 2023-04-21 17-10-11

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero
Copy link
Contributor Author

caguero commented Apr 21, 2023

Hmm, the activation areas look correct.

I found a typo in the activation area of the big hole in placard #1. Could you give it a try again?

@M1chaelM
Copy link
Collaborator

OK, I think it's working, with the caveat that it seems like there's often 1 hit that doesn't get counted. Here's how I'm testing:

ros2 launch vrx_gz competition.launch.py world:=practice_2022_scan_dock_deliver0_task
  • Wait for the scoring plugin to enter the OnRunning state.
  • Pause the simulation.
  • Edit the pose of the WAMV to teleport to x=-481.664, y=193.897
  • Upause.
  • Launch balls into the target.

Once when I did this I hit the target 4 times but only got credit for 3. The first hit was ignored. I'm not sure whether this problem could be created by the fact that I'm pausing, teleporting and unpausing.

I tried a second time and moved the WAMV around a little bit before firing. In the second run my first hit was scored, but the second hit was ignored.

If you have any ideas about why this is happening and / or a quick fix, then I can definitely test it again before we merge. Otherwise, since there's a possibility that the problem would not arise in normal use, maybe we should just document the issue and then go ahead with the merge.

@caguero
Copy link
Contributor Author

caguero commented Apr 21, 2023

OK, I think it's working, with the caveat that it seems like there's often 1 hit that doesn't get counted. Here's how I'm testing:

ros2 launch vrx_gz competition.launch.py world:=practice_2022_scan_dock_deliver0_task
  • Wait for the scoring plugin to enter the OnRunning state.
  • Pause the simulation.
  • Edit the pose of the WAMV to teleport to x=-481.664, y=193.897
  • Upause.
  • Launch balls into the target.

Once when I did this I hit the target 4 times but only got credit for 3. The first hit was ignored. I'm not sure whether this problem could be created by the fact that I'm pausing, teleporting and unpausing.

I tried a second time and moved the WAMV around a little bit before firing. In the second run my first hit was scored, but the second hit was ignored.

If you have any ideas about why this is happening and / or a quick fix, then I can definitely test it again before we merge. Otherwise, since there's a possibility that the problem would not arise in normal use, maybe we should just document the issue and then go ahead with the merge.

No ideas right now and I don´t think it's related with the pause/unpause part.

@M1chaelM
Copy link
Collaborator

Do you want to keep working on it? Or write up an issue or merge? I'm ok with either.

@caguero
Copy link
Contributor Author

caguero commented Apr 21, 2023

Do you want to keep working on it? Or write up an issue or merge? I'm ok with either.

I don´t see the issue right now, I'm leaning towards merging it and continue looking at it after the initial relase.

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.

Ok, sounds good.

@caguero caguero merged commit c9ce7ea into main Apr 21, 2023
@caguero caguero deleted the caguero/practice_scan_dock_release branch April 21, 2023 17:27
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