Ask Your Question
0

Is there a shell command to get ros distro?

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

auzn gravatar image

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

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 -0600

jayess gravatar image

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

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 imagegvdhoorn ( 2018-03-02 01:37:16 -0600 )edit
2

A quick Google search gives me #q284146.

That's recursive ;)

130s gravatar image130s ( 2018-03-02 02:30:15 -0600 )edit
1

Indeed, probably from the wrong tab instead of #q33769

tfoote gravatar imagetfoote ( 2018-03-02 19:05:18 -0600 )edit

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

jayess gravatar imagejayess ( 2018-03-02 19:18:32 -0600 )edit

rosversion -d is what I am looking for

auzn gravatar imageauzn ( 2018-03-03 08:18:34 -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

2 followers

Stats

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

Seen: 294 times

Last updated: Mar 02 '18