Field-Robotics-Lab / dave

Project DAVE
Apache License 2.0
224 stars 72 forks source link

New UUV Addition #244

Open crvogt opened 2 years ago

crvogt commented 2 years ago

Test with roslaunch dave_robot_launch virgil.launch

Depends on field-robotics-lab/uuv_simulator#8

bsb808 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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...

bsb808 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

crvogt commented 2 years ago

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

Currently:

crvogt commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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

crvogt commented 2 years ago

@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,

mabelzhang commented 2 years ago

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

bsb808 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

Mine is a Logitech F310

j-herman commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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