Is there a shell command to get ros distro?
Is there something I can run in the shell to get something like: "ros-kinetic" or "ros-lunar", depends on what distro I have? "
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
Is there something I can run in the shell to get something like: "ros-kinetic" or "ros-lunar", depends on what distro I have? "
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
source
ing the rightsetup.bash
, theROS_DISTRO
environment variable should be set.
Which means that you can get the ROS distribution with
echo $ROS_DISTRO
as well
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2018-03-01 16:46:18 -0500
Seen: 2,312 times
Last updated: Mar 02 '18