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

Elec lead #189

Merged
merged 11 commits into from
Feb 25, 2022
Merged

Elec lead #189

merged 11 commits into from
Feb 25, 2022

Conversation

dtdavi1
Copy link
Contributor

@dtdavi1 dtdavi1 commented Feb 8, 2022

Updated flying lead functionality can be tested with either of the following demos (only the second includes the new plug/receptacle model):

ros_launch dave_demo_launch dave_electrical_mate.launch

or

roslaunch dave_demo_launch dave_plug_and_socket_demo.launch

Updates include the following:
Force calculations for insert & extract aligned with the plug link
New meshes and models
Male-to-female and female-to-male plug/receptacle combos
Underwater platform model (incorporated into both SDF and URDF demos)
Added ROS functionality to expose calculated force applied to the plug link during insert & extract
rqt_plot /m_to_f_plug/appliedForce/vector to visualize the message
Tutorial updates to account for changes

Electrical platform model added that uses new mesh
dave_demo_launch/dave_electrical_mate.launch and
dave_demo_launch/dave_plug_and_socket_demo.launch both
updated to use the new electrical platform.

Plug and socket model names were changed (m_to_f_plug & m_to_f_socket)
to differentiate them from the new plug and receptacle models
(the new models are female-plug-to-male receptacle) which will be
added shortly.
Added female plug to male socket models and URDF (xacro) templates.
Incorporated updated models into the
dave_demo_launch/dave_plug_and_socket_demo.launch demo.  The demo
now contains one of the male-to-female plug/socket pairs and two of
the female-to-male plug/receptacle pairs.
Decreasing the scale a little bit to make the fit more forgiving.
Also updated all of the models to avoid name conflicts if
they're used multiple times in the same world.
Force is calculated as the force applied to the plug link by
either the sensor plate link (during plug insertion) or the
gripper links (during plug extraction). Forces are published
as a 3D vector in the plug link frame (since calculated force
is from different links during insertion and extraction, it will
always be positive along the X axis).  Only force in the X
direction is used to determine whether or not the lock or unlock
threshold has been met.
@bsb808
Copy link
Contributor

bsb808 commented Feb 11, 2022

Is the example roslaunch dave_demo_launch dave_plug_and_socket_demo.launch represented in the wiki pages somewhere? I see roslaunch dave_demo_launch dave_electrical_mate.launch in https://github.com/Field-Robotics-Lab/dave/wiki/Electrical-Plug-Mating-Plugin.

Maybe we could add the first roslaunch to the existing wiki, add a screenshot and explain the differences between the two examples?

@bsb808
Copy link
Contributor

bsb808 commented Feb 11, 2022

I was able to run both roslaunch examples and see that the /m_to_f_plug/appliedForce/vector was advertised. I'm probably not skilled enough to drive the vehicle and arm to test this, so my proposed plan is...

  1. Once the documentation (see comment above) is addressed, then I'll approve.
  2. Go ahead and merge
  3. Find someone to take on Teleop interface for applying force/torque to models #193
  4. Once we have solved Teleop interface for applying force/torque to models #193, use that to test/demonstrate the mating forces and create a highlight video.

@dtdavi1 Sound like a plan?

@dtdavi1
Copy link
Contributor Author

dtdavi1 commented Feb 16, 2022

I've updated the wiki some to better differentiate between the two demos (the dave_plug_and_socket_demo is towards the end). I'm working on a video demo and will finalize that before the release.

This was referenced Feb 21, 2022
@dtdavi1
Copy link
Contributor Author

dtdavi1 commented Feb 25, 2022

For a quick test of the plugin functionality, the world file that is used in the dave_electrical_mate.launch demo can be modified as follows:
Comment out line 174
Uncomment line 175

This will position the plug in the socket's opening (but not engaged) upon startup. The prismatic joint will be formed right after startup, but there won't be enough applied force to lock it. If you maneuver the RexROV to the stand and lightly bump the plug downward, the joint should lock almost immediately (and should be indicated in the terminal window).

Unlocking will still require you to grab the plug handle with the gripper and pulling upwards (but that's much easier than doing the whole insertion evolution).

@bsb808 bsb808 modified the milestones: 4.3.1, 4.3.0 Feb 25, 2022
@bsb808
Copy link
Contributor

bsb808 commented Feb 25, 2022

@dtdavi1 Both of the launch examples run for me.

I ran the example you suggest to start with the plug aligned. When I nudge it with the ROV I get some errors reported to the terminal:

Msg] m_to_f_socket and m_to_f_plug are aligned in orientation and distance
[Msg] m_to_f_socket and m_to_f_plug within proximity
[Msg] m_to_f_socket-m_to_f_plug joint formed
[Msg] m_to_f_socket-m_to_f_plug joint locked!
Error [Param.cc:457] Out of range. Unable to set value [6.94416e-310 ] for key[upper].
Error [Param.cc:457] Out of range. Unable to set value [6.94416e-310 ] for key[lower].
[Msg] m_to_f_socket-m_to_f_plug joint unlocked!
[Msg] m_to_f_socket-m_to_f_plug joint removed
[Msg] m_to_f_socket and m_to_f_plug are aligned in orientation and distance

Are these expected?

@dtdavi1
Copy link
Contributor Author

dtdavi1 commented Feb 25, 2022

@bsb808 They're all either expected or at least not surprising. Here's a summary of what the stream is telling you:
The first is a report that the plug and socket are properly aligned.
The second is a report that the prismatic joint was created (i.e., they've been properly aligned for the requisite amount of time)
The third is a report that the joint was locked (i.e., it's plugged in) because the right amount of pressure was applied
I have no idea what the errors are (they occur on occasion but don't really affect anything). You can write it up as an issue (or I will) if you want, but I don't think they should prevent the merge.
The "joint unlocked" and "joint removed" mean that it was unplugged. If you didn't actually grab it and pull, it was probably a byproduct of the plug being jostled when it was plugged in (i.e., it plugged in successfully but then popped loose).
The last line is from the process starting all over because it's not plugged in but is properly aligned.

@bsb808
Copy link
Contributor

bsb808 commented Feb 25, 2022

@dtdavi1 Understood. The [Msg]s are really helpful and I understood those - it was the Error that makes me unsure if things are operating as expected.

I opened an issue so we can run this to ground post 4.3.0 - #227

Please merge when you can.

Copy link
Contributor

@bsb808 bsb808 left a comment

Choose a reason for hiding this comment

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

Ready to merge

@dtdavi1
Copy link
Contributor Author

dtdavi1 commented Feb 25, 2022

@bsb808 Sounds good. My best guess is that the error is associated with a race condition that occurs when the joint is locked and then removed too quickly (which occurs somtimes when the insertion is rough).

@dtdavi1 dtdavi1 merged commit ef45e67 into master Feb 25, 2022
@dtdavi1 dtdavi1 deleted the elec_lead branch February 25, 2022 18:48
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