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

Issue with visualizer #124

Open
cmower opened this issue Apr 10, 2023 · 4 comments
Open

Issue with visualizer #124

cmower opened this issue Apr 10, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@cmower
Copy link
Owner

cmower commented Apr 10, 2023

I'm not sure when this happened, but the LBR model in the examples is messed up. From running other code, I am pretty much certain there is nothing wrong with optas.RobotModel. I think the issue must be in optas.Visualizer. Strange that the LWR is fine. It could be something to do with how this visual frames are defined (I made changes in the visualizer that handled the case when multiple visual frames for a link are defined). When I load the same model for the LBR into Pybullet it is put together fine. I probably missed something standard.

@cmower cmower added the bug Something isn't working label May 8, 2023
@FrankC96
Copy link

You should consider removing all the "arrayfying" decorators and put a clause like so:

if isinstance(position, DM):
            position = position.toarray().flatten().tolist()
        else:
            position = position

for all variables that are converted to a list in visualize.py. This is a quick fix to run the example, I don't know how it will affect the whole program.

@cmower
Copy link
Owner Author

cmower commented Jun 16, 2023

Thanks @FrankC96! The arrayify decorator is to ensure that the array-like inputs to all the decorated functions have type casadi.DM or casadi.SX - the main point of this is to prevent code repetition.

Just to clarify, did you have the changes to visualize.py that make the LBR example work without affecting the other examples? If so, I'd appreciate if you could set up a pull request.

@FrankC96
Copy link

To my best knowledge the other examples, are not affected. I created the pull request.

@cmower cmower changed the title Issue with LBR model. Issue with visualizer Aug 11, 2023
@cmower
Copy link
Owner Author

cmower commented Aug 11, 2023

Screenshot from 2023-08-11 13-30-02

I loaded the LBR model into pybullet, and all is well. This confirms the issue is with the visualizer and how it extracts the robot geometry.

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