Ask Your Question
12

How to get ROS version?

asked 2012-05-11 00:34:15 -0600

liborw gravatar image

updated 2014-04-20 14:09:39 -0600

ngrennan gravatar image

Hi, is there a way how to get ROS version which I'm using. I mean not the one of electric, fuerte and so on, but if I'm using beta or not?

edit retag flag offensive close merge delete

Comments

As this is a popular question and a top google result, maybe the accepted answer should be changed to a current solution, like the one presented by merosss

bi613en gravatar imagebi613en ( 2018-04-19 04:20:48 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
45

answered 2014-10-08 06:41:09 -0600

merosss gravatar image

updated 2019-03-23 14:33:18 -0600

As of Indigo the correct command for ROS1 is:

rosversion -d

For ROS2 instead use:

echo $ROS_DISTRO
edit flag offensive delete link more

Comments

rosversion -d

also works for hydro

Will Chamberlain gravatar imageWill Chamberlain ( 2016-01-13 23:06:37 -0600 )edit

rosversion -d gives me "jade" rosversion roscpp gives me "1.11.16" Does it mean I am using 1.11.16 jade version? Thank you

willSapgreen gravatar imagewillSapgreen ( 2016-05-01 22:02:59 -0600 )edit
2

work for Kinetic

lhnguyen gravatar imagelhnguyen ( 2016-09-02 02:45:45 -0600 )edit

This does not work on ROS2.

breandan gravatar imagebreandan ( 2019-03-23 01:34:35 -0600 )edit
1

@breandan I've updated the answer ;)

merosss gravatar imagemerosss ( 2019-03-23 14:33:51 -0600 )edit
5

answered 2012-05-11 00:59:22 -0600

Lorenz gravatar image
rosversion ros

This will print a version number. The current Fuerte release has version number 1.8. Everything above should be unstable at the moment.

edit flag offensive delete link more

Comments

To clarify: it currently prints 1.8.6, anything starting with 1.9.0 should be unstable. You should not see the unstable version unless you explicitly install it.

joq gravatar imagejoq ( 2012-05-11 01:55:30 -0600 )edit
7

It says <unversioned>

salman gravatar imagesalman ( 2013-04-08 23:54:53 -0600 )edit
1

It fails for me on Hydro, too. That may be a new bug. It should say 1.10.0. Probably worth a defect ticket: https://github.com/ros/ros/issues/new

joq gravatar imagejoq ( 2013-04-09 04:08:33 -0600 )edit

for me too it says < unversioned >

leo pauly gravatar imageleo pauly ( 2014-02-22 23:03:19 -0600 )edit
6

It has to be an actual package name. I don't think there is a package named **ros** any more. Try it with ``rosversion roscpp``.

joq gravatar imagejoq ( 2014-02-23 04:07:08 -0600 )edit

rosvrrsion roscpp works perfectly for hydro, thanks

bhanu gravatar imagebhanu ( 2015-12-18 05:22:37 -0600 )edit

$ rosversion ros <unversioned> with current kinetic (1.12.2) mmh?

user23fj239 gravatar imageuser23fj239 ( 2016-08-18 07:33:10 -0600 )edit

For me (ros jade on Ubuntu 14.04) this just prints "Cannot locate [ros]"

antonio gravatar imageantonio ( 2017-04-14 16:13:35 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-05-11 00:34:15 -0600

Seen: 71,327 times

Last updated: Mar 23