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
It is not possible to add new URDF robots in different path of models #177
Comments
Good point. How would you like to be able to write the code you share with your students. Give an example and we'll see what we can do! It's an important use case. |
In this link you can download the minimal example. |
Good news is I could load your mesh files after few tricks using the given minimal example.
This is a temporary workaround but shows a way to improve the toolbox later. |
Ok, so default to current folder, then fallback to the distribution. We are thinking about putting the models in a separate package, they make the RTB package very large and don't change much. This won't affect operation from user perspective. |
I'm also having issues loading my own URDF. I created my own class using the other URDF python files as an example and then added this to the I also just pulled master and see you've removed Swift... At any rate, I'm very interested to see how to load a custom URDF and get it to display. |
I continue having the problem with my own urdf when I try to use a personalized swift backend. If I test my backend with a library robot(UR3 test) and my arduino robot and works, by the idea is that the student has created his own urdf (real robot too). The problem is when I try to work with my custom urdf with my custom swift backend (example) it does not find the urdf file and said when execute add:
What I understand is that it is looking the folder xacro but in this moment is executing the swift_serial backend so he try to open the library path. |
I found the problem, I made launch before add. @mcevoyandy May be is your problem too, first use env.add and then add.launch |
Launch() should be called before add(). Are you saying that ordering causes an error?
peter
… On 30 Apr 2021, at 5:44 am, olmerg ***@***.***> wrote:
I found the problem, I made launch before add.
@mcevoyandy <https://github.com/mcevoyandy> May be is your problem too, first use env.add and then add.launch
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#177 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIUUYIGRRMA4HTZDWW6DTLGZKBANCNFSM4XXMOSXQ>.
|
yes, this was the solution, maybe is my implementation, because launch call reset, which in my implementation send to home my robot and reset the robot position. |
I reopen the issue because the solution implemented works if I execute a python, but with a notebook, it opens the first moment, but if I try to create again the robot object(or create another robot) it does not detect the folder xacro. The problem is that the path of ipython is not the same of the ipyn file. |
. |
Hey @olmerg, I'm unable to reproduce the error, I have started a Jupyter Notebook in my home directory (outside of the Toolbox Python directory) and include the code:
and it works correctly. Are you on the latest version of the toolbox? |
This are the conditions:
The problem is that the path of ipython is not the same of the ipynb file. |
I can reproduce the issue. Not only in jupyter notebook. urdf from @olmerg previous comment
|
@olmerg workaround / temporary fix for now:
|
Well, I think it's because >>> from os import getcwd
>>> getcwd()
'C:\\Users\\XXXX'
>>> backend = Swift()
>>> getcwd()
'C:\\Users\\XXXX'
>>> backend.launch()
>>> getcwd()
'C:\\' |
@mfkenson However, changing the current working directory back would result in a 404 error page if the swift page get refreshed. |
I've worked out a solution. No more need for |
I am giving my robotic class using this amazing tool in python library, but I found a problem. In an exercise, I want that student use a specific urdf, but It is not possible to view the mesh because Mesh.filename use an absolute path
àbspath
to the models of the toolbox.I know that this is the only error, because I change to the specific path and works, but I do not find which could be the best solution in the architecture of your code
robotics-toolbox-python/roboticstoolbox/tools/urdf/urdf.py
Line 301 in 276efaa
The text was updated successfully, but these errors were encountered: