ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is there a shell command to get ros distro?

asked 2018-03-01 16:46:18 -0500

auzn gravatar image

updated 2018-03-01 16:46:42 -0500

Is there something I can run in the shell to get something like: "ros-kinetic" or "ros-lunar", depends on what distro I have? "

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-03-01 17:11:08 -0500

jayess gravatar image

updated 2018-03-02 19:18:31 -0500

A quick Google search gives me #q33769. The more recent of the two answers there show that if you want to see which distro is in use (Indigo and later), run

rosversion -d

otherwise run

rosversion ros

to see the version for pre-Indigo (for me this command returns <unversioned>, I'm using Indigo).


Edit:

as @gvdhoorn pointed out in the comments

Additionally, after sourceing the right setup.bash, the ROS_DISTRO environment variable should be set.

Which means that you can get the ROS distribution with

echo $ROS_DISTRO

as well

edit flag offensive delete link more

Comments

1

Additionally, after sourceing the right setup.bash, the ROS_DISTRO environment variable should be set.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-02 01:37:16 -0500 )edit
2

A quick Google search gives me #q284146.

That's recursive ;)

130s gravatar image 130s  ( 2018-03-02 02:30:15 -0500 )edit
1

Indeed, probably from the wrong tab instead of #q33769

tfoote gravatar image tfoote  ( 2018-03-02 19:05:18 -0500 )edit

@130s and @tfoote good catch. Missed that.

jayess gravatar image jayess  ( 2018-03-02 19:18:32 -0500 )edit

rosversion -d is what I am looking for

auzn gravatar image auzn  ( 2018-03-03 08:18:34 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-03-01 16:46:18 -0500

Seen: 3,336 times

Last updated: Mar 02 '18