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

Weird behaviour of raisim::world::rayTest #56

Closed
mstoelzle opened this issue Feb 12, 2021 · 6 comments
Closed

Weird behaviour of raisim::world::rayTest #56

mstoelzle opened this issue Feb 12, 2021 · 6 comments

Comments

@mstoelzle
Copy link

@jhwangbo I experienced some weird behaviour for some cases when using the raisim::world::rayTest method for my raycasting. In this example I am raycasting from a vantage point one meter above ground in the center of the grid. In the first screenshot you can see the result I received with the code build on raisim. In the second screenshot you can see the result I would expect to see (the elevation of the rectangle in the upper-left is at 10m and the rest of the ground is flat at 0m) and which I received after writing my own rayTest code. I am not sure, maybe I used parameters for the raisim::world::rayTest method which failed in some edge-cases, but it was hard for me to debug without seeing the source code.

Result of raycasting using raisim::world::rayTest (https://github.com/mstoelzle/grid-map-raycasting/blob/raisim/src/main.cpp):
Screenshot 2021-02-12 at 16 04 29

Result of raycasting using my own rayTest code (https://github.com/mstoelzle/grid-map-raycasting/blob/master/src/main.cpp):
Screenshot 2021-02-12 at 21 22 31

@jhwangbo
Copy link
Contributor

Can you share the raisimUnity screenshot as well?

@mstoelzle
Copy link
Author

Screenshot 2021-02-14 at 20 29 26

Hi @jhwangbo , I attached an screenshot of the height map in raisimUnity

@jhwangbo
Copy link
Contributor

You also need to visualize the scan points as well. You can check rayDemo2

@mstoelzle
Copy link
Author

I tried to run the rayDemo2.py using raisimPy to see the visualization of the scan points, but it fails with this error:

Assertion failed: (index >= 0 && index < size()), function operator[], file /usr/local/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h, line 162.
zsh: abort      python raisimPy/examples/rayDemo2.py
``

@jhwangbo
Copy link
Contributor

I fixed a bug in the demo file. you can run it.
Next time you should run the code in debug mode and tell me which line failed. Currently, I don't have time to resolve all issues.

@jhwangbo
Copy link
Contributor

I'll close this issue until I see the visualization.

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