Closed vassil-atn closed 2 years ago
You should export ROS_PACKAGE_PATH as /opt/openrobots/share/example-robot-data/robots
or set
mesh_dir=/opt/openrobots/share/example-robot-data/robots
Thanks for the quick reply! I apologise, I should have included my directory code in the issue as well.
pinocchio_model_dir = join("/opt/openrobots", "share")
model_path = join(pinocchio_model_dir, "example-robot-data/robots")
mesh_dir = pinocchio_model_dir
urdf_filename = "a1.urdf"
urdf_model_path = join(join(model_path, "a1_description/urdf"), urdf_filename)
This works for the A1 robot, which is one of the example robots, it does not work for the Go1, however. Following your suggestion, changing the ROS_PACKAGE_PATH did not work but changing the mesh_dir did work:
pinocchio_model_dir = join("/opt/openrobots", "share")
model_path = join(pinocchio_model_dir, "example-robot-data/robots")
mesh_dir = model_path
urdf_filename = "go1.urdf"
urdf_model_path = join(join(model_path, "go1_description/urdf"), urdf_filename)
Changing the mesh_dir to the model_path works for the Go1 but not for the A1 (which now gives the ValueError).
Thanks again for solving the problem! I do wonder though why a different path for the mesh_dir needs to be specified for the two robots, even though the go1_description and a1_description are both subdirectories of example-robot-data/robots. Is there something I'm missing here, or is it maybe because one of them is a custom robot_description?
@Vassil17 would you be keen to integrate the standard Go1 in example-robot-data?
I would be more than happy if you help us with this ;)
Quick answer. There is no universal way to define the description of the robot. So, I would say that you should check the urdf path written in the urdf file.
Thanks, I'll take a look at that!
@cmastalli As a disclaimer I'm just a master's student working with the Go1, however I would still be happy to help!
Thanks, I'll take a look at that!
@cmastalli As a disclaimer I'm just a master's student working with the Go1, however I would still be happy to help!
That's fine. We are happy to review your PR.
Hello,
I've been trying to get pinocchio (and gepetto-viewer) to work on a custom robot model (that of the Go1), but while the URDF gets loaded without a problem, when I try loading the mesh model get the following error:
For reference, I have sourced everything and added the "/opt/openrobots/share" to the ROS_PACKAGE_PATH. The other robots in the example-robot-data package load just fine. The meshes/ folder also contains all the necessary files (I believe):
Do you know what could be causing this or how I could fix it? Is there anything else I need to set up to make it recognise the mesh files? Thanks!