Giter VIP home page Giter VIP logo

Comments (10)

DrakeProvost avatar DrakeProvost commented on June 10, 2024 1

@BenjaminHug8 yes it is. Thank you for the prompt responses throughout this thread!

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

Thank you for raising this issue, I will fix that!

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

May I ask you your ROS distribution?

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

It seems like you are missing the ros-DISTRO-ament-index-python, where DISTRO is your ros distribution.

If it is already installed, can you show your PYTHONPATH?

from urdf2webots.

DrakeProvost avatar DrakeProvost commented on June 10, 2024
$ printenv | grep -i ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
AMENT_PREFIX_PATH=/opt/ros/foxy
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
_colcon_cd_root=/home/drakeprovost/ros2_install
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
ROS_LOCALHOST_ONLY=0
PATH=/opt/ros/foxy/bin:/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
ROS_DISTRO=foxy

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024
$ printenv | grep -i ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
AMENT_PREFIX_PATH=/opt/ros/foxy
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
_colcon_cd_root=/home/drakeprovost/ros2_install
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
ROS_LOCALHOST_ONLY=0
PATH=/opt/ros/foxy/bin:/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
ROS_DISTRO=foxy

It seems all good to me, have you checked if ros-foxy-ament-index-python is installed?

Could you try to use python3 instead of python2 when running the script?

from urdf2webots.

DrakeProvost avatar DrakeProvost commented on June 10, 2024

Forgive my ignorance, can you tell me how to check if ros-foxy-ament-index-python is installed?

Trying python3 does seem to have accomplished something (if python2 doesn't work, it might be worth updating the command in the README):

$ python3 -m urdf2webots.importer --input=Rover_2022.urdf --output=Rover_2022.proto
Root link: Chassis
There are 5 links, 4 joints and 0 sensors
$ ls
README.md  Rover_2022.csv  Rover_2022.proto  Rover_2022_textures  Rover_2022.urdf

(In response to the "package not found" stuff, I see I have in Rover_2022.urdf a lot of <mesh filename="package://Rover_2022/meshes/Chassis.STL" /> but haven't put the meshes repo in my directory, so that one's on me. I'll update this comment once I've done that)

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

Forgive my ignorance, can you tell me how to check if ros-foxy-ament-index-python is installed?

One way to do it is to run dpkg -l ros-foxy-ament-index-python in a terminal, but as python3 is working that means it is installed.

Trying python3 does seem to have accomplished something

Nice :)

As ROS 2 is working with python3 you probably cannot run the conversion tool with python2.

(if python2 doesn't work, it might be worth updating the command in the README):

I guess it might help users you are right, but as you can use the tool with ROS 1 (which is suppose to work with python2 until noetic I guess) I will add something accordingly.

$ python3 -m urdf2webots.importer --input=Rover_2022.urdf --output=Rover_2022.proto
Package "Rover_2022" not found.
Can't determine package root path.

This error mainly says that no "Rover_2022" package has been found with ROS 2, you either need to install the package and then re source foxy, or if it is your package you should build it and then source it.
Here is an example in our ROS 2 packages that should be released this summer with Webots R2022b.

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

(if python2 doesn't work, it might be worth updating the command in the README):

I guess it might help users you are right, but as you can use the tool with ROS 1 (which is suppose to work with python2 until noetic I guess) I will add something accordingly.

I confirm that ROS 2 and ROS 1 noetic uses python3.

ROS 1 Melodic works with python2 but I believe it should also work with python3. As we no longer support Melodic I will simply change the command for python3.

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 10, 2024

@DrakeProvost is your issue solved?

from urdf2webots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.