0
$\begingroup$

Rosanswers logo

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

e.g. rosversion nano_light

0.0.0

where 0.0.0 is saved in the ROS package XML

is there an API to get this data from rospy?


Originally posted by nirge on ROS Answers with karma: 3 on 2021-01-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

import rospkg

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

# Output: '1.3.0'

Originally posted by tryan with karma: 1421 on 2021-01-25

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.