osrf / srcsim

Space Robotics Challenge
Other
9 stars 4 forks source link

Head trajectory pitch > 0.47 hangs head / neck response #96

Closed osrf-migration closed 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Rud Merriam (Bitbucket: rmerriam).

The original report had attachments: 2017-03-06-15-32-50.bag


Using the python keyboard script if the head pitches to 0.5 it will tip forward beyond that value and become unresponsive.

With my C++ code if the head pitches past 0.47 the head pitches beyond the limit and becomes unresponsive. This code is using the head-trajectory message.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


Changed this to a blocker since it causes a controller failure and collapse of R5. That's not going to be acceptable during the competition.

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


The head drops and is unresponsive when you pitch the chest forward by 0.43. So there is no way around the issue.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


That's going to make it difficult to see the solar panel plug for task 2. Have my doubts about Val getting down low enough to do the plugin so visual processing may be moot.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I think as a workaround you can try controlling the neck joint angles instead of the head angles. For some reason, the controller isn't strong enough to hold it up if it falls. I couldn't figure out why this afternoon.

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


I don't think that will work because the head drops when you pitch the chest forward.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


Just speculating but the simulation of the motor force on the lower neck joint might be incorrect, i.e. lower force than in reality.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I did more testing, and I think the effort limits and PID gains should be high enough to lift the neck. I'm going to report this to IHMC to see if they have any insight.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Here's a rosbag and video illustrating the problem:

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


In that video, I send a head pitch angle command of 0.5 radians, which causes the neck to slump over. Once it is slumped over, I reset the command to 0 radians, but it doesn't recover. I then apply a torque to the head link to lift it up until the controller recovers and holds in place.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Here's another video with plots of neck pitch angle and torque:

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Ok, it seems that one of the gains for the lower neck joint was a little low. I've raised it in the following PR:

This can be manually patched by modifying the following code block in /opt/nasa/indigo/share/val_description/model/urdf/valkyrie_sim_gazebo_sync.urdf:

  <joint name="lowerNeckPitch" type="revolute">
    <origin rpy="0.0 0.0 0.0" xyz="0.0203518 0.0 0.33845"/>
    <axis xyz="0 1 0"/>
    <parent link="torso"/>
    <child link="lowerNeckPitchLink"/>
    <limit effort="26" lower="0" upper="1.162" velocity="5"/>
    <controller_gains Kd="3" Ki="3" Kp="50"/>
    <dynamics damping="0.1" friction="0.0"/>

make sure that Ki="3"

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


Just tried the new integral value and it doesn't work on my system.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


@rmerriam can you give any more detail? Maybe some plots of joint angle and effort or a rosbag? I really want to know if this works or not, but I don't have much to go on. Has anyone else tried it?

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


Is there another file that must be updated ? The same thing happened when the head was oscillating (issue #72), even though I had changed the URDF file it didn't work until you released the upgrade.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Here's a copy of the updated urdf:

I'm pretty sure that's the only file that needs to change.

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


Confirmed the changes but no luck. The identical situation occurred when I changed the damping on the neck joints for issue #72. I also remember that the Qual2Plugin.cc and Qual2Plugin.hh needed to be changed to compile a libQual2Plugin.so file in order to reverse the button action in the first round. Would that be the case here ?

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I hadn't thought that a recompilation would be necessary. I'll try rebuilding a fresh docker image and replace the urdf and see if that works.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Ok, I've confirmed that simply pasting the urdf doesn't fix the problem, which is confusing to me. It works when I build from source. I'm still investigating. Thanks for your patience.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Ok, I just realized why the Ki gain wasn't working: there is a change that needs to be made to the val_gazebo package in order for integral gains to work. My apologies for the mistake.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Ok, the following urdf should work by increasing the proportional gain and joint damping at the neck instead of integral gain:

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


It worked thanks.

osrf-migration commented 7 years ago

Original comment by Aric Stewart (Bitbucket: aricstewart).


Is this coming in a future package or should we just put it in place ourselves?

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It should be released at some point, but the pull request hasn't been merged yet:

osrf-migration commented 7 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


We have released an updated package, and the neck control should now be fixed. Please sudo apt-get update; sudo apt-get dist-upgrade to try it

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


The head drops and becomes unresponsive if you make numerous adjustments. We have to reset Val to get control again.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


@T_AL hm... I had thought the neck was fixed. If you can give some more information I will try to reproduce the failure.

osrf-migration commented 7 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


@T_AL, is this still an issue for you?

osrf-migration commented 7 years ago

Original comment by Erica Tiberia (Bitbucket: T_AL).


Everything seems to working fine.

Regards

osrf-migration commented 7 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).