| 49 | } |
| 50 | |
| 51 | void randomize_transform( |
| 52 | Eigen::Isometry3d& tf, |
| 53 | double translation_limit = 100, |
| 54 | double rotation_limit = 100) |
| 55 | { |
| 56 | Eigen::Vector3d r = random_vec<3>(translation_limit); |
| 57 | Eigen::Vector3d theta = random_vec<3>(rotation_limit); |
| 58 | |
| 59 | tf.setIdentity(); |
| 60 | tf.translate(r); |
| 61 | |
| 62 | if (theta.norm() > 0) |
| 63 | tf.rotate(Eigen::AngleAxisd(theta.norm(), theta.normalized())); |
| 64 | } |
| 65 | |
| 66 | void randomize_transforms(common::aligned_vector<Eigen::Isometry3d>& tfs) |
| 67 | { |
no test coverage detected