[ros-users] Ros version checking in python scripting
kwc at willowgarage.com
Tue Feb 1 23:48:17 UTC 2011
There's no fast way to check the version from a Python script -- you
can shell to bin/rosversion (or re-use its code, as it is Python).
However, there are two alternatives that achieve your goal:
from rospy import Header
2) The Pythonic way of doing multi-version compatibility:
from std_msgs.msg import Header
from roslib.msg import Header
On Tue, Feb 1, 2011 at 12:45 PM, Steven Bellens
<steven.bellens at mech.kuleuven.be> wrote:
> Due to the moving of the Header.h file from roslib to std_msgs we need
> to check the ROS version involved to include the right header in our
> rtt_ros_integration package.
> How can we check the ROS version in a python script?
> When exactly did this move happen, e.g. what's the version to check for?
> ros-users mailing list
> ros-users at code.ros.org
More information about the ros-users