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

New UUV Addition #244

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

New UUV Addition #244

wants to merge 18 commits into from

Conversation

crvogt
Copy link
Contributor

@crvogt crvogt commented Mar 23, 2022

Test with roslaunch dave_robot_launch virgil.launch

Depends on Field-Robotics-Lab/uuv_simulator#8

@crvogt crvogt changed the title Uuv virgil addition New UUV addition Mar 23, 2022
@crvogt crvogt changed the title New UUV addition New UUV Addition Mar 23, 2022
@bsb808 bsb808 self-requested a review March 23, 2022 23:17
@bsb808
Copy link
Contributor

bsb808 commented Mar 23, 2022

Could you add instructions to the vehicle model wiki - https://github.com/Field-Robotics-Lab/dave/wiki/vehicle_examples
Also include how to teleop the robot so that users can test the propulsion functionality.

@bsb808
Copy link
Contributor

bsb808 commented Mar 23, 2022

For the .dae and .png files, recommend renaming files to follow the same convention used for other robot modes, e.g., virgil.dae virgil_collision.dae, virgil.png etc.

@crvogt
Copy link
Contributor Author

crvogt commented Mar 23, 2022

For the .dae and .png files, recommend renaming files to follow the same convention used for other robot modes, e.g., virgil.dae virgil_collision.dae, virgil.png etc.

Yes, still working on it. Haven't gotten to the wiki yet.

@bsb808
Copy link
Contributor

bsb808 commented Mar 24, 2022

Teleoperation via gamepad is not working for me. I think we want to be consistent with this mapping: https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping

Currently what see is...

  • right thumb fwd: vehicle negative yaw, no visible thruster motion
  • right thumb left: vehicle positive yaw, only visible thruster motion is stbd vert
  • left thumb fwd: vehicle negative yaw; port-rear thruster spins
  • left thumb left: vehicle positive yaw, port vert thruster spins

@bsb808
Copy link
Contributor

bsb808 commented Mar 24, 2022

Appears to be two propellers - one large grey one that is expected, and a second small black one that appears to be joined 90 degrees to the grey one.

Screenshot from 2022-03-23 17-10-00

When actuated, it appears that only the small black prop spins.
prop_spin

Recommend checking the location and orientation of the thruster applied forces.

@bsb808
Copy link
Contributor

bsb808 commented Mar 24, 2022

As part of this PR let's update and expand our documentation on how to setup and provision and new vehicle: https://github.com/Field-Robotics-Lab/dave/wiki/New-Underwater-Vehicle

The goal is to have sufficient documentation on how this is all done so that our student, doing it all for the first time, will be able to do this for our pending robotic boats with thruster and rudder.

@bsb808
Copy link
Contributor

bsb808 commented Mar 24, 2022

As a surrogate vehicle, we should include standard sensors: DVL, pressure, P3D, IMU, etc.

@crvogt
Copy link
Contributor Author

crvogt commented Mar 24, 2022

This PR was meant as a draft. During the name change it lost draft status.

Currently:

  • Still trying to figure out how to access the submeshes for the propellers. I used the original just to get it working (eca...)
  • This is not the only model with the teleop not working correctly. I based everything on caldus/caracara, only to find they also don't work as expected.

@crvogt
Copy link
Contributor Author

crvogt commented Mar 24, 2022

As part of this PR let's update and expand our documentation on how to setup and provision and new vehicle: https://github.com/Field-Robotics-Lab/dave/wiki/New-Underwater-Vehicle

The goal is to have sufficient documentation on how this is all done so that our student, doing it all for the first time, will be able to do this for our pending robotic boats with thruster and rudder.

Yes, I was intending to do this once everything was working.

@crvogt
Copy link
Contributor Author

crvogt commented Mar 24, 2022

Appears to be two propellers - one large grey one that is expected, and a second small black one that appears to be joined 90 degrees to the grey one.

Screenshot from 2022-03-23 17-10-00

When actuated, it appears that only the small black prop spins. prop_spin

Recommend checking the location and orientation of the thruster applied forces.

This appears to be happening with the caracara as well.

@bsb808
Copy link
Contributor

bsb808 commented Mar 24, 2022

@crvogt - I didn't realize it was still a draft. I was waiting on this to be able to writeup one of the paper sections, so was keen to get it reviewed and merged. Just let me know when it is ready for review.

One additional thing you may consider. It appears that the baseline needs to be moved relative to the meshes. The ROS convention is

x forward
y left
z up

Also, the other UUVs have the base_link roughly at the center-of-gravity of the model. Here is the visualization of the current base_link location and orientation wrt to the meshes:

Screenshot from 2022-03-24 03-33-18

@bsb808 bsb808 mentioned this pull request Mar 24, 2022
@bsb808 bsb808 added this to the 4.3.1 milestone Mar 25, 2022
@crvogt
Copy link
Contributor Author

crvogt commented Mar 25, 2022

@bsb808 If you have a chance could you verify the teleop behavior? The only UUV that acts as I would "expect" is the rexrov, but I'm thinking it might be my gamepad.

Otherwise,

  • I've specified the orientation according to the convention (I initially didn't think a rotation would be required to attain that until you showed the axis visual).
  • Still having trouble with the mesh, but managed to remove props from the old mesh and added in the rexrov props which aren't too dissimilar. (EDIT: Cole sent new prop files)
  • Lined up props, uuv is at least controllable now.
  • Added and adjusted positions of sensors

@mabelzhang
Copy link
Contributor

Could you merge from master so that you have green CI? We fixed CI on master elsewhere.

@bsb808
Copy link
Contributor

bsb808 commented Mar 30, 2022

Running locally in docker I still see ...

  1. props are not spinning on the appropriate axis. Appears that maybe the joint is specified with rotation axis perpendicular to what it should be.
  2. Teleoperation via gamepad is still not working for me. We want to be consistent with this mapping: https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping

@crvogt
Copy link
Contributor Author

crvogt commented Apr 1, 2022

Created PR in uuv_simulator Field-Robotics-Lab/uuv_simulator#8 to add arguments for propeller rotation.
Added new thrusterop file to correctly mix thruster commands and use all propellers.

@j-herman
Copy link
Contributor

@crvogt Reviewed per your request - resulting behavior does not match specs for https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping. Where the mapping differs, I've listed the current behavior in bold:

Right Analog Mini Stick
• Up: Thrust forward. Slide left
• Down: Thrust reverse. Slide right
• Left: Slide left. No perceived motion
• Right: Slide right. No perceived motion
Left Analog Mini Stick
• Up: Lift. Lift, cross-coupling left rotation
• Down: Sink. Sink, cross-coupling right rotation
• Left: Rotate counter-clockwise.
• Right: Rotate clockwise.

The cross-coupling may be due to the dynamics of the UUV, so maybe we don't want to fix it, but it was pretty significant. I'll take a quick scan through the joystick mapping to see if anything stands out as a possible cause.

@j-herman
Copy link
Contributor

Just to confirm what's being sent from my joystick is what you're expecting, here's the mapping from my gamepad to the ROS message.

Right Analog Mini Stick
• Up: joy.axes[3] - positive
• Down: joy.axes[3] - positive
• Left: joy.axes[2] - positive
• Right: joy.axes[2] - negative
Left Analog Mini Stick
• Up: joy.axes[1] - positive
• Down: joy.axes[1] - negative
• Left: joy.axes[0] - positive
• Right: joy.axes[0] - negative

@crvogt
Copy link
Contributor Author

crvogt commented Apr 11, 2022

@crvogt Reviewed per your request - resulting behavior does not match specs for https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping. Where the mapping differs, I've listed the current behavior in bold:

Right Analog Mini Stick • Up: Thrust forward. Slide left • Down: Thrust reverse. Slide right • Left: Slide left. No perceived motion • Right: Slide right. No perceived motion Left Analog Mini Stick • Up: Lift. Lift, cross-coupling left rotation • Down: Sink. Sink, cross-coupling right rotation • Left: Rotate counter-clockwise. • Right: Rotate clockwise.

The cross-coupling may be due to the dynamics of the UUV, so maybe we don't want to fix it, but it was pretty significant. I'll take a quick scan through the joystick mapping to see if anything stands out as a possible cause.

Thank you. With my current PS4 controller the mapping matches https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping exactly, so first I'll try swapping gamepads.

@j-herman
Copy link
Contributor

Mine is a Logitech F310

@j-herman
Copy link
Contributor

j-herman commented Apr 11, 2022

Just as a note, that controller mapping doesn't seem to be correct for the rexrov, either

I get forward/aft motion from the arrow pad rather than the mini stick.

@j-herman
Copy link
Contributor

And, confirmed. Your new UUV behaves just like the rexrov for me. I think maybe the issue is that the mapping described in the wiki was changed at some point to work with the PS4 controller or something else different than the Logitech F310.

@crvogt
Copy link
Contributor Author

crvogt commented Apr 11, 2022

And, confirmed. Your new UUV behaves just like the rexrov for me. I think maybe the issue is that the mapping described in the wiki was changed at some point to work with the PS4 controller or something else different than the Logitech F310.

I agree. I'll move this model over to the F310 mapping. Thanks for confirming with the rexrov.

@woensug-choi
Copy link
Collaborator

If you change anything at https://github.com/Field-Robotics-Lab/dave/wiki/Logitech-F310-Gamepad-Mapping. Let me know :D
New address for the specific document would be https://field-robotics-lab.github.io/dave.doc/contents/manipulator_demos/Logitech-F310-Gamepad-Mapping/

@crvogt
Copy link
Contributor Author

crvogt commented Apr 12, 2022

@woensug-choi Will do! but I don't think we'll be changing that.

@j-herman Did you try this via docker? I just plugged in my Logitech F310, did a fresh build, and everything is still working as expected for me.

@j-herman
Copy link
Contributor

@crvogt I just ran it on my system. I can give it another shot in docker tomorrow. Do you think that might change the mappings? I am wondering about drivers.

@j-herman
Copy link
Contributor

It's not an uncommon problem, apparently.
https://askubuntu.com/questions/609447/logitech-f310-controller-isnt-mapping-correctly (and others)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to_be_discussed To be discussed at next group meeting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants