-
Notifications
You must be signed in to change notification settings - Fork 34
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
Tests for PyBulletClient and PyBulletPlanner #429
base: main
Are you sure you want to change the base?
Conversation
…nt support for FrameWaypoints . PointAxisWaypoints will be in next PR
…ction would crash
Co-authored-by: Gonzalo Casas <casas@arch.ethz.ch>
Co-authored-by: Gonzalo Casas <casas@arch.ethz.ch>
One interesting error I found after fixing the error calculation method inside The new logic of comparison are as follows:
When threshold is 1e-06, the "threshold * threshold" requires is therefor 1e-12. The following printout statement shows that the Pybullet engine will bring the squared distance to about 6e-09 in 10 iterations, to 2e-09 in 20 iterations and 3e-10 in 40 iterations. Now
Now we had a completely wrong comparison in the past, so we didn't catch such error. But now that the comparision is fixed, the previous default 20 iterations will not bring us down to threshold of 1e-06. This is all a balance of accuracy vs computing time, I think considering the 10th iteration resulted in 6e-09, equivalent to 7.7e-05 meters or 0.077 mm in real live. I suggest changing the default IK accuracy threshold to 0.1mm, which is already much better than many industrial robot accuracy.
|
Not to mention 1e-06 is a micrometer and according to wikipedia, the length of a typical bacterium is 1 to 10 micrometer... |
Note that the new Pybullet Tests are skipped in the IronPython environment. This is done by adding them to the exclude list in the ipy_test_runner.py |
This PR fixes a few problems I encountered while writing unit tests for PyBullet. The problems are:
Fixed error in
PyBulletForwardKinematics.forward_kinematics
where function would crash ifoptions
was not passed.Fixed error in
PyBulletInverseKinematics._accurate_inverse_kinematics
where threshold was not squared for comparison.Added
PyBulletClient.load_existing_robot
to load from an existing Robot, such as those in RobotLibrary. This makes writing tests much easier.Added unit test for
PyBulletClient
andPyBulletPlanner
backend features, including Ik and FK agreement tests.This should be reviewed after #428 and earlier PRs are merged to main.