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

IMU-Camera calibration: Export poses fails #577

Closed
Youras opened this issue Nov 8, 2022 · 1 comment
Closed

IMU-Camera calibration: Export poses fails #577

Youras opened this issue Nov 8, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Youras
Copy link
Contributor

Youras commented Nov 8, 2022

Hello,
When I try to perform the IMU-camera calibration with the argument --export_poses an error is thrown at line:
print >> f, "t x y z r11 r12 r13 r21 r22 r23 r31 r32 r33"

I think the function exportPoses is deprecated and needs fixing.

@goldbattle goldbattle added the bug Something isn't working label Nov 8, 2022
@goldbattle
Copy link
Collaborator

def exportPoses(cself, filename="poses_imu0.csv"):
f = open(filename, 'w')
print >> f, "t x y z r11 r12 r13 r21 r22 r23 r31 r32 r33"
imu = cself.ImuList[0]
bodyspline = cself.poseDv.spline()
times = np.array([im.stamp.toSec() + imu.timeOffset for im in imu.imuData \
if im.stamp.toSec() + imu.timeOffset > bodyspline.t_min() \
and im.stamp.toSec() + imu.timeOffset < bodyspline.t_max() ])
for time in times:
position = bodyspline.position(time)
orientation = bodyspline.orientation(time)
print >> f, time, ' '.join(map(str, position)), \
' '.join(map(str, orientation.reshape(-1)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants