Closed Remi-Tortue closed 7 months ago
Hi @Remi-Tortue
This might be related to not defining the ROS_PACKAGE_PATH
correctly. You need to include the install path of example-robot-data.
Hi @cmastalli, Thank you for your response.
I already have
export ROS_PACKAGE_PATH=/opt/openrobots/share:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=/opt/openrobots/share/example-robot-data:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=/opt/openrobots/include:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=/opt/openrobots/include/example-robot-data:$ROS_PACKAGE_PATH
in my bashrc.
And I have source install/setup.bash
.
Should have I used another path?
Now, I understand your issue. This code is designed to work within Pinocchio.
If you want to use the Romeo humanoid robot, then do
import example_robot_data
romeo = example_robot_data.load("romeo")
print("this is the Pinocchio model", romeo.model)
Please next time try
We are a small team with many responsibilities and I cannot answer each one's question. I hope you can understand this.
Hi I'm using ROS2 humble on Ubuntu 22.04, coding in python. I'm trying to implement Pinocchio example in my own ROS2 package but I am facing an issue: accessing example-robot-data path (for getting .urdf and .srfd). In the example
join(dirname(dirname(str(abspath(__file__)))),"models")
is used, but this does not work in other packages than Pinocchio. I've tried two installations:/opt/openrobots/share/example-robot-data
and I haven't found a way to access it other than using the absolute path.colcon build
, example-robot-data is in the install directory, but isn't found by netherros2 pkg prefix
orget_package_share_directory
.For now I'm using the absolute path from openrobotics, but is there a better way to do it?