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

matlab tips #2

Open
JadBatmobile opened this issue Jun 26, 2018 · 9 comments
Open

matlab tips #2

JadBatmobile opened this issue Jun 26, 2018 · 9 comments

Comments

@JadBatmobile
Copy link

JadBatmobile commented Jun 26, 2018

No description provided.

@JadBatmobile
Copy link
Author

JadBatmobile commented Jun 26, 2018

the odoms(1,:) and odoms(2,:) fields are not filled in the generateSimdata.m script. Only odoms(3,:) is.

That means that the mainSimulation will not work with new data.

Should i add the lines:

odoms(i,1)=truth_traj(i,1);
odoms(i,2) = truth_traj(i,2);

to line 37 in generateSim.data?

Thanks

@JadBatmobile
Copy link
Author

I added those lines.. The algorithm does not converge on my dataset however. Can you perhaps review generateSim.data? The algorithm works on the data you provide in simulation.mat... but any other attempts have failed.

@JadBatmobile
Copy link
Author

Also, I received this error when running generateSim.data:

Array indices must be positive integers or logical values.

Error in Processer/setupobjects (line 29)
obj.objects(i).P(lm_edge.label(i))=1;

I had to change line 64 from:

lm_edge.label=[lm_edge.label truth_objects(idx,3)'];

to:
lm_edge.label=[lm_edge.label truth_objects(idx,3)'+1];

Havling zeros in lm_edge.label causes Processer.m to fail.

@mubeipeng
Copy link
Owner

When the window pop out, you are supposed to click a few waypoints, which represents the trajectory of the robot. If you skip that step, the trajectory would be empty and there would be problems

@JadBatmobile
Copy link
Author

JadBatmobile commented Jun 28, 2018

Yes, but the problem is that
node_edge.dpos(:,i)= R'*(odoms(i,1:2)-odoms(i-1,1:2))'

But odoms(1:2) are empty!
So node_edge.dpos ends up being empty, and therefore the data cannot be used...

In the code:

for i=1:length(truth_traj)-1
odoms(i,3)=atan2(truth_traj(i+1,2)-truth_traj(i,2),truth_traj(i+1,1)-truth_traj(i,1));
end
odoms(end,3)=odoms(end-1,3);

Notice that odoms(i,3) are filled, but odoms (i,1) and odoms(i,2) are not! So node_edge.dpos is not filled.

@JadBatmobile
Copy link
Author

In my application, i have a bunch of pose and observation data. The pose is w.r.t to a global reference frame (like truth_traj in your code). The observations are w.r.t to the vehicle.

I need to translate these readings to node_edge and lm_edge objects for utilizing with your framework.

I am having trouble doing this translation. I am looking at your simulation.mat provided file, and i can't seem to relate node_edge.dpos / dtheta with the truth_traj provided.

For example, truth_traj as theta values -3.1298 for the first 7 index.. however node_edge.dtheta is non-zero for those index. How can that be?

@Ethan-Zhou
Copy link

I come across the same issue as @JadBatmobile does. The generateSimData.m does not work as expected. Also, the definition of the orientation seems not correct. How is the rotation matrix defined? R_w_c or R_c_w?
Finally, the visualization of the groundtruth is somehow 180-deg flipped compared to the one shown in your arxive paper. Please fix these problems!!

@heemonsu
Copy link

heemonsu commented Dec 14, 2018

I faced the same problem and have fixed the issues as best as I could. I have added a pull request for the same, but I guess this repository isn't maintained anymore by the author. If anyone is interested, you can take a look at my forked version of this repo. I have also added comments to explain some parts of the code.

@mubeipeng
Copy link
Owner

mubeipeng commented Dec 20, 2018 via email

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

4 participants