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

OpenGL Request #3

Open
tr0ublee opened this issue Jul 19, 2019 · 5 comments
Open

OpenGL Request #3

tr0ublee opened this issue Jul 19, 2019 · 5 comments

Comments

@tr0ublee
Copy link

Hello, thanks for the sample codes. They really helped me a lot. I am looking for a way to make drawing stuff with OpenGL on markers. Do you know any tutorials, or do you know how to do this ? Thanks in advance.

@kanishkegb
Copy link
Member

kanishkegb commented Jul 19, 2019 via email

@tr0ublee
Copy link
Author

Hello again,
thanks for the reply. Actually, I have a Python script that draws a cube on aruco markers using OpenGL. I will also code it on C++, but there is one issue. Whenever I move the camera, the cube also moves with the camera. If I can sort that out, I guess it will be done. Is there any chance that you happen to know what causes this ? Btw cube never leaves marker but still it moves with camera (i.e, cube moves on aruco marker).

@kanishkegb
Copy link
Member

kanishkegb commented Jul 21, 2019

I am not entirely sure about the reason or what you mean when you say "cube moves on aruco marker". One possible reason would be the origin of the cube. If you need the cube to be on the marker, the origin of the cube must be on the bottom most face.

In other words, if you are drawing a unit cube, the (x,y,z) coordinates must be as follows:
(1, 1, 1)
(1, -1, 1)
(-1, -1, 1)
(-1, 1, 1)
(1, 1, 0)
(1, -1, 0)
(-1, -1, 0)
(-1, 1, 0)

If this is correct, I am not sure what is wrong with your code.

@tr0ublee
Copy link
Author

Actually it is not my code. I found the code on stackoverflow and thought it would give me some idea about the process. So, I took the code and run it on my computer. When marker is at the center, cube is drawn on it. But when I move the marker to the right for example, cube also moves to the right but it is no longer on marker. I tried the solution mentioned in the comment but didnt work. Can you have a look at the code and tell what is wrong with it? Btw, of course my problem is the same with the guy's problem who posted the code. Link to code
https://stackoverflow.com/questions/50764623/object-is-wrong-displaced-in-ar-aruco-opengl

@kanishkegb
Copy link
Member

kanishkegb commented Jul 22, 2019 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

2 participants