Ask Your Question

How can I test a ros package version from python script

asked 2021-01-21 09:20:30 -0600

nirge gravatar image

It appears there's a mechanism to fetch package version via ROS, available in CLI

e.g. rosversion nano_light


where 0.0.0 is saved in the ROS package XML

is there an API to get this data from rospy?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-25 09:29:10 -0600

tryan gravatar image

Here's one way to do it in Python, using rospkg:

import rospkg

r = rospkg.RosPack()
m = r.get_manifest('my_package')

# Output: '1.3.0'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-01-21 09:19:39 -0600

Seen: 84 times

Last updated: Jan 25 '21