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

Error updating the F/T sensor driver #64

Open
albertK opened this issue Mar 12, 2014 · 15 comments
Open

Error updating the F/T sensor driver #64

albertK opened this issue Mar 12, 2014 · 15 comments

Comments

@albertK
Copy link

albertK commented Mar 12, 2014

I followed this tutorial:
http://wiki.ros.org/ethercat_hardware/Tutorials/UsingForceTorqueSensorWithWG035
and tried to make the F/T sensor on our PR2 robot work.

When I ran the command:
sudo pr2-ft-config --left 12411 --right 12393
I got the following error message:
ERROR: Patch URDF failed:
patch -i /usr/share/pr2-ft/ft_left.groovy.patch -o /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml

patching file /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml
Hunk #1 FAILED at 2877.
1 out of 1 hunk FAILED -- saving rejects to file /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml.rej

I then tried to add the --debug option:
sudo pr2-ft-config --left 12411 --right 12393 --debug
and here was the error message I got:
Detected ROS distro as groovy
Neither --urdf nor --launch specified; assuming both
Looking for URDF: /etc/ros/groovy/urdf/robot.xml
Found URDF: /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml
Found base URDF: /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml
Using left patch: /usr/share/pr2-ft/ft_left.groovy.patch
Using right patch: /usr/share/pr2-ft/ft_right.groovy.patch
Left URDF does not exist; creating it: /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml
Patch command: patch -i /usr/share/pr2-ft/ft_left.groovy.patch -o /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml
ERROR: Patch URDF failed:
patch -i /usr/share/pr2-ft/ft_left.groovy.patch -o /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml

patching file /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13.xml
Hunk #1 FAILED at 2877.
1 out of 1 hunk FAILED -- saving rejects to file /etc/ros/groovy/urdf/robot_calibrated_2013_07_03_12_13_ft_left.xml.rej

How to solve it, thanks.

@trainman419
Copy link
Contributor

It looks like it's having a hard time patching the calibrated URDF. Try using it with the uncalibrated urdf instead.

@albertK
Copy link
Author

albertK commented Mar 12, 2014

I tried to add the --urdf option and run the command like this:
sudo pr2-ft-config --left 12411 --right 12393 --urdf /etc/ros/groovy/urdf/robot_uncalibrated.xml

The output message is:
URDF updated. You should run a full-system calibration: http://www.ros.org/wiki/pr2_calibration/Tutorials/Calibrating%20the%20PR2

However, when I rerun "roslaunch /etc/ros/robot.launch" and "rostopic list | grep /ft" I get nothing out. The /ft topic does not exist. I then found that /etc/ros/groovy/ft.launch is empty, which is included in /etc/ros/robot.launch.

What step did I missed? Thanks

@trainman419
Copy link
Contributor

You should also run the pr2-ft-config tool with the --launch option, to update the PR2 launch files to include the FT configuration.

@albertK
Copy link
Author

albertK commented Mar 12, 2014

Thanks for the rapid reply!

I first run "sudo pr2-ft-config" to undo the previous modification
Then I run the configuration command like this:
sudo pr2-ft-config --left 12411 --right 12393 --urdf /etc/ros/groovy/urdf/robot_uncalibrated.xml --launch

Here's the output:
Configuring launch files with left = 12411 and right = 12393
URDF updated. You should run a full-system calibration: http://www.ros.org/wiki/pr2_calibration/Tutorials/Calibrating%20the%20PR2

However, I still cant find the /ft topic using "rostopic list |grep /ft"

@trainman419
Copy link
Contributor

That looks like it's configuring the launch files and the URDF correctly now.

Do you see any errors when you run roslaunch /etc/ros/robot.launch ?

Are there any errors or messages in the PR2 diagnostics relating the to F/T sensors?

@albertK
Copy link
Author

albertK commented Mar 12, 2014

No, there are no F/T related errors when I run "roslaunch /etc/ros/robot.launch". As for the diagnostics, I run "rosrun rqt_pr2_dashboard rqt_pr2_dashboard" and get warnings for the gripper accelerometers. The full messages are as follow:

Full Name: /Other/Accelerometer (r_gripper_motor)
Component: Accelerometer (r_gripper_motor)
Hardware ID: 68-05006-01154
Level: 1
Message: Bad accelerometer sampling frequency

Accelerometer: Ok
Accelerometer range: +/-2G (0)
Accelerometer bandwidth: 1500Hz (6)
Accelerometer sample frequency: 40851.586512
Accelerometer missed samples: 11943882

@albertK
Copy link
Author

albertK commented Mar 13, 2014

I checked the pr2_dashboard again and found that there wasn't F/T related diagnosis entries.

According to this tutorial:
http://wiki.ros.org/ethercat_hardware/Tutorials/UsingForceTorqueSensorWithWG035
, it should be under the "Sensors" category. However, there's only pressure sensor and accelerometer in the "Sensors" category.

Does that mean the F/T sensor is not connected?

@trainman419
Copy link
Contributor

That sounds like the F/T sensors either aren't attached or aren't configured properly.

You may want to open an official support ticket for this.

@albertK
Copy link
Author

albertK commented Mar 14, 2014

Okay, except for the possibility of a hardware problem, I wonder if there are any sofware configuration problems that we can try to learn and fix before open an ticket? Some configuration tutorial or documentations will be helpful. Thanks!

@trainman419
Copy link
Contributor

You've found the existing documentation. The rest of the information about the F/T sensors is either in my head or in Derek King's head; he designed the boards, wrote the gripper firmware and the controllers, and I took it over from him and wrote the pr2-ft-config tool. Neither of us work for Willow Garage at this time.

If I still worked for WG, at this point I would check the production records against your serial number to confirm that we shipped F/T sensors with your PR2, and I would check the records for your robot and sensors to validate that they were functional when we shipped your robot.

Beyond that, I would look at the complete output from roslaunch /etc/ros/robot.launch and the contents of the parameter server once the robot is up and running, to verify that the proper parameters to enable the F/T sensors are enabled.

It would also be prudent to check the firmware version on your grippers to verify that they have the proper firmware version, something like 2.208 if I'm remembering properly. You should be able to do this through the diagnostics.

@albertK
Copy link
Author

albertK commented Mar 19, 2014

Thanks for the advice! Too sad to hear that you're not working in Willow Garage now. I still remembered the useful helps from you in the tickets we opened before.

Anyway, I still have two questions to ask.

  1. How to check the gripper version?
    I open up the dashboard and find that there is no specific category for the gripper. The only information I found about gripper is in Motors->EtherCAT Device (l_gripper_motor). The firmware about that device is:
    Product code: WG06 (6805006) Firmware Revision 1.02, PCB Revision E.01
    I'm not sure if this is the gripper firmware you mentioned above.

2)What is the force/torque related parameter?
I dumped out all the parameters using rosparam dump. Here is the result:
http://notepad.cc/gaoluro90
It seems that there is no force/torque related parameter.

@trainman419
Copy link
Contributor

  1. The parameters to enable the F/T sensors are realtime_loop: r_gripper_motor: enable_ft_sensor and realtime_loop: l_gripper_motor: enable_ft_sensor ; it looks like they're both set to true for you robot.

  2. The gripper firmware version is the version listed under Motors->EtherCAT->l_gripper_motor and r_gripper_motor. It looks like you don't have the correct firmware on your grippers. Did you perform an MCB firmware upgrade recently? Are you sure that you have F/T sensors installed?

@albertK
Copy link
Author

albertK commented Mar 19, 2014

Sure, the sensor is installed on the both wrists of the robot. That's how we know that we should type "sudo pr2-ft-config --left 12411 --right 12393" command to set the F/T sensor. We get the serial number by the sticker attached on the sensor. Besides, we had confirmed that the the sensor is shipped with PR2 and worked well after we unpacked it.

As for the firmware update, I remembered that we've performed the firmware update for the forearm camera. I wonder if this will affect the gripper. Is there any way to update the gripper firmware to the correct version? Thanks!

@trainman419
Copy link
Contributor

It should be possible to upgrade the gripper to the proper firmware version. You'll have to contact official PR2 support for that; I don't have copies of the appropriate firmware or the internal docs that document how to upgrade the firmware. Send them a link to this ticket when you contact them; it will save a great deal of debugging time.

In theory, a camera firmware upgrade shouldn't affect the gripper firmware, but without knowing exactly which commands you ran, it's impossible to say for sure.

@albertK
Copy link
Author

albertK commented Mar 20, 2014

OK, we'll open a ticket to fix this problem. Thanks so much about the help!

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

No branches or pull requests

2 participants