Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ros distro showing "one" #26

Open
mouhyemen opened this issue Aug 15, 2023 · 2 comments
Open

Ros distro showing "one" #26

mouhyemen opened this issue Aug 15, 2023 · 2 comments

Comments

@mouhyemen
Copy link

I followed the README and completed all the steps until docker. On running roscore, I get the following:

ros_distro_from_source_showing_one

Notice that the rosdistro shows "one"

On command line, I get the following output when running rosversion ros

mouhkhan@pop-os ~ $ rosversion ros
<unversioned>

I was expecting to see noetic as the distro. Did I miss anything?

@lucasw
Copy link
Owner

lucasw commented Aug 28, 2023

My roscore reports /rosdistro: Debian, same with rosversion --distro- but I'm using the pre-built debian packages (following https://github.com/lucasw/ros_from_src/blob/robot_state_publisher/ubuntu_2204/README.md), not building completely from source.

I'm not clear where that version string comes from, rosversion is in https://github.com/ros-infrastructure/rospkg, but maybe ttps://github.com/ros-infrastructure/rosdistro or does that interact with files from somewhere else to determine version- and sets ROS_DISTRO?

one I think is the same as ros-o so your system reporting that is accurate, and ros-o and the debianized versions are mostly the same- what is the issue with it not reporting as noetic? The changes with noetic are minimal, no ros messages have changed or any other breaking changes to prevent a noetic system talking to a one/Debian system that I'm aware of- it's just that the source code needs some updates to build and run on the newer systems.

@lucasw
Copy link
Owner

lucasw commented Aug 28, 2023

I finally tracked it down to this code which for me is in /usr/lib/python3/dist-packages/rospkg/rosversion.py:

    if args.distro:
        if 'ROS_DISTRO' in os.environ:
            distro_name = os.environ['ROS_DISTRO']
        else:
            distro_name = get_distro_name_from_roscore()
        if not distro_name:
            distro_name = 'Debian'
        printer(distro_name)
        sys.exit(0)

In the noetic version it would have been set to unknown https://github.com/ros-infrastructure/rospkg/blob/master/src/rospkg/rosversion.py#L118C1-L126C20

        if not distro_name:
            distro_name = '<unknown>'

Which means your distro is coming from get_distro_name_from_roscore() or $ROS_DISTRO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants