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

Update calibration script #276

Open
hamyyy opened this issue Mar 29, 2023 · 3 comments
Open

Update calibration script #276

hamyyy opened this issue Mar 29, 2023 · 3 comments

Comments

@hamyyy
Copy link

hamyyy commented Mar 29, 2023

After this fix, things started to work a little better. Although i was experiencing errors in the following file:

rospy.set_param(calibration_params_namespace+"/calibrate", yaml.load(open(calibration_yaml)))
rospy.set_param(calibration_params_namespace+"/hold", yaml.load(open(hold_yaml)))

The error complains of a missing "Loader" argument to the yaml.load() function. The fix seems to be to add the argument Loader=yaml.FullLoader. Otherwise the script raises an error and calibration never occurs.

rospy.set_param(calibration_params_namespace+"/calibrate", yaml.load(open(calibration_yaml), Loader=yaml.FullLoader))
rospy.set_param(calibration_params_namespace+"/hold", yaml.load(open(hold_yaml), Loader=yaml.FullLoader))

more info about this error here

@v4hn
Copy link
Member

v4hn commented Mar 29, 2023

@hamyyy please provide pull requests instead of issues for things like this. At least I (as one of the people who can merge patches here) don't use this calibration because we changed the kinematic structure of our PR2.

In your particular solution: I believe you should use yaml.safe_load instead of the FullLoader.
Afaik the calibration yaml files do not need code execution.

@hamyyy
Copy link
Author

hamyyy commented Mar 30, 2023

My apologies @v4hn, I'll keep that in mind for next time. I'm relatively new to working on large git projects. I'll create a pr once ive managed to fix the calibration scripts.

On the topic of calibration, the pr2_calibration packages don't seem to run on noetic (no surprise there). Im slowly getting things working on my PR2. Im curious how you calibrate the cameras to get the pointcloud aligned to the robot's environment

@v4hn
Copy link
Member

v4hn commented Mar 30, 2023

At the moment we rely mostly on the robot_calibration framework for hand-eye calibration. In the future we might switch to ATOM.
If you did not modify your PR2, it might be easier to get the old calibration package to run (and send patches).
Notice that (at least for us) the startup detection of zero-crossings for the arms is notably worse (I've seen 1.5cm EEF distance) in summer due to the joint transmissions and the encoders being after the transmissions. This problem was even documented somewhere rather fuzzily in the docs.
I wrote this utility to get more stable results, and hardware maintenance can definitely help too, but it's a source of error you might want to be aware of when working on calibration that persists between startups.

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