← Back to search

[ROS Q&A] 043 - How to retrieve the robot name from the URDF file?

The Construct Robotics Institute 8:47

758 views · 5 likes Watch on YouTube ↗

More ROS Learning Resources: https://goo.gl/DuTPtK

Q: How to retrieve the robot name from the URDF file?

A: This can be accomplished by loading a URDF file, parsing it and calling the getName() method of the C++ Urdf model.

To see how to load and parse a URDF file, you can follow the Parse a urdf file tutorial (http://wiki.ros.org/urdf/Tutorials/Parse%20a%20urdf%20file).

After compile the code and generate the executable called "parser" following the "Parse a urdf file" tutorial, you can call it with the path of the URDF file as argument.

Something like: rosrun your_package_name parser /path/to/your/file.urdf

---------Want to learn ROS really FAST and master the latest Robotics topics?-----------
::Visit Robot Ignite Academy, the online Academy that teaches you ROS really FAST, from beginner to master, using only a web browser: https://goo.gl/LBT7EN
Robot Ignite Academy is an integrated ROS learning platform which contains a series of online ROS tutorials tied to online simulations, giving you the tools and knowledge to understand and create any ROS based robotics development.

——————Are you a ROS expert and want to develop FAST your next ROS project?-----------

:: Then, use the ROS Development Studio (RDS) for your next project: https://goo.gl/EtFqmE
With the ROS Development Studio, you will be able to:
- Develop ROS programs for robots in a faster way, with an already setup IDE environment that includes autocomplete.
- Test the programs in real time on the provided simulated robots. Use the provided simulations or upload your own. Quickly see the results of your programming.
- Debug using graphical ROS tools.
- Test what you have developed on RDS in the real robot (if you have it :wink:
all of these are using ONLY a web browser without any installation and not limited by any operating system. DEVELOP FOR ROS USING WINDOWS, LINUX OR OSX.

Category (YouTube): Science & Technology

Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.