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

Poses from interpolate_ins_poses using RTK has broken sections. #31

Open
maximechoulika opened this issue Apr 13, 2020 · 1 comment
Open

Comments

@maximechoulika
Copy link

maximechoulika commented Apr 13, 2020

Hi,
I have found broken sections using rtk.csv file with interpolate_ins_poses function.

Screen Shot 2020-04-13 at 10 02 39 AM
Screen Shot 2020-04-13 at 10 03 34 AM
Screen Shot 2020-04-13 at 10 03 59 AM

I used this code snippet to generate the plots:

ins_path = os.path.join(dataset_dir, "images", dataset, "gps/rtk.csv")
timestamp_path = os.path.join(dataset_dir, "images", dataset, f"mono_{view}.timestamps")
    
pose_timestamps = np.loadtxt(timestamp_path)[:, 0].tolist()

origin_timestamp = pose_timestamps[0]
    
print('Interpolating poses...')
insext = np.loadtxt(os.path.join('robotcar_helper/extrinsics', f'mono_{view}.txt')).tolist()
mtx = transform.build_se3_transform(insext)

T_I_Cx = pose.fromMatrix(np.asarray(mtx)).inverse()
T_Cx_C = pose.yRotationDeg(90) * pose.zRotationDeg(90)
T_I_C = T_I_Cx * T_Cx_C

T_W_I0 = pose.xRotationDeg(180)

T_I0_I = interpolate_poses.interpolate_ins_poses(
    ins_path, pose_timestamps[1:], origin_timestamp, use_rtk=True)

T_I0_I = [pose.fromMatrix(np.asarray(i)) for i in T_I0_I]

T_W_Cs = [T_W_I0 * i * T_I_C for i in T_I0_I]
t_W_Cs = np.array([T_W_C.t.ravel() for T_W_C in T_W_Cs])

plt.scatter(t_W_Cs[:, 1], t_W_Cs[:, 0], marker='.', s=4)

plt.axes().set_aspect('equal')
plt.grid()
plt.show()

The traversal used in this example is 2014-11-28-12-07-13.

I have also direclty plot the poses using northing/easting data provided in the rtk.csv file an I have observed similar issues at similar sections of the traversal.

Screen Shot 2020-04-13 at 10 06 56 AM

Screen Shot 2020-04-13 at 10 07 03 AM

Screen Shot 2020-04-13 at 10 06 47 AM

@echo-gui
Copy link

Hi, I try to generate groundtruth trajectories using the rtk files, may I ask what is the pose in pose.fromMatrix()?

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