0
$\begingroup$

Rosanswers logo

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


Originally posted by auzn on ROS Answers with karma: 3 on 2018-03-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by jayess with karma: 6155 on 2018-03-01

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by gvdhoorn on 2018-03-02:
Additionally, after sourceing the right setup.bash, the ROS_DISTRO environment variable should be set.

Comment by 130s on 2018-03-02:\

A quick Google search gives me #q284146.

That's recursive ;)

Comment by tfoote on 2018-03-02:
Indeed, probably from the wrong tab instead of #q33769

Comment by jayess on 2018-03-02:
@130s and @tfoote good catch. Missed that.

Comment by auzn on 2018-03-03:
rosversion -d is what I am looking for

$\endgroup$

Your Answer

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