Ask Your Question
0

How should I list packages that are not located in the repository root in rosdistro file ?

asked 2018-04-12 22:26:41 -0600

zcm gravatar image

updated 2018-04-13 03:56:39 -0600

Hello, everyone,

I have some packages that are not located in the repo root, so I need to find an example of a release repo in the rosdistro file to finger out how to list these packages correctly ? But I can't find one...

From this link http://wiki.ros.org/bloom/Tutorials/F... , packages should be list like:

foo: packages: foo_msgs: foo_server: foo_utils: But the kinetic rosdistro file shows:

  packages:
  - hector_compressed_map_transport
  - hector_geotiff
  - hector_geotiff_plugins
  - hector_imu_attitude_to_tf
  - hector_imu_tools
  - hector_map_server

There isn't colon at the end of each package.

When packages are not located in the root dir:

packages:
  foo_msgs: util/foo_msgs
  foo_server: tool/foo_server

I tried this use python yaml module, packages as a dict, and foo_msgs as a key. But there don't have paths information in the created rosdistro file ? I don't know what I did wrong, Thanks!


Edit: Hello, I checked the code in rosdistro package:

class Package:

def __init__(self, name, repository_name):
    self.name = name
    self.repository_name = repository_name

    # for backward compatibility only
    self.subfolder = None
    self.status = None
    self.status_description = None

The subfolder is always None...

So this means new rosdistro file doesn't support putting packages in subfolders anymore ? I have to put all packages in the root of repo ?

Edit: Thanks for suggestions from @gvdhoorn, I should add more information about the problem!

Actually, I want to use bloom to release my project, but I don't want it to open pull request for me. I am using a local custom rosdistro, so I need to fill the release info into my rosdistro file including the packages list in my project repo. Then the problem is that rosdistro module can't parse the yaml correctly when the listed packages are not in the top directory of my repo... like can't find package.xml or can't find its depends... So I want to know is there a way to list packages name and their paths in the yaml file, and rosdistro module can parse and find package's depends correctly ? Thanks!

edit retag flag offensive close merge delete

Comments

I'm not sure what your asking exactly. The yaml files you mention list packages by their name, not their file system location. rospkg and all other ROS libraries/tools that handle packages use names and there is infrastructure to find pkgs on the FS. Can you clarify why you believe you need ..

gvdhoorn gravatar imagegvdhoorn ( 2018-04-13 03:29:16 -0600 )edit

.. to list packages with (relative) file system paths exactly? Is there a document, page or tutorial that gives you that impression?

Also note: Bloom (and some other tools) will generate the yaml listings, that is not something you do by hand typically.

gvdhoorn gravatar imagegvdhoorn ( 2018-04-13 03:29:38 -0600 )edit

@gvdhoorn Thanks for your reply! I see the yaml file just list package names, not relative location, in like kinetic rosdistro file. But I see from the tutorial http://wiki.ros.org/bloom/Tutorials/F... , at the very end of the page.

zcm gravatar imagezcm ( 2018-04-13 03:36:18 -0600 )edit

"If necessary, a path to that package can be specified after the colon if it is not located in the repository root"

zcm gravatar imagezcm ( 2018-04-13 03:36:31 -0600 )edit

And I see some code in rosdistro package, that it can't find the package.xml of the package, when I put the package in the subfolder, functions like "rosdistro.dependency_walker" won't work anymore. Because it only know package name from that yaml file, if I am not wrong somewhere..

zcm gravatar imagezcm ( 2018-04-13 03:39:14 -0600 )edit
1

Let's take a step back (to avoid an xy-problem): what are you actually trying to do? Releasing a ROS package? Importing a 3rd party release? Something else?

Please edit your original question with the new information. Use the edit button/link and append.

gvdhoorn gravatar imagegvdhoorn ( 2018-04-13 03:44:05 -0600 )edit

@gvdhoorn, I have updated my question adding some details, Thanks!

zcm gravatar imagezcm ( 2018-04-13 03:57:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-04-13 04:11:24 -0600

gvdhoorn gravatar image

Actually, I want to use bloom to release my project, but I don't want it to open pull request for me.

At the end of the Bloom release process, it should ask you whether you want it to submit your PR for you or not. If you answer N at that step, it should leave the changes to the local clone of rosdistro in tact, and you should be able to edit whatever you want.

Then the problem is that rosdistro module can't parse the yaml correctly when the listed packages are not in the top directory of my repo... like can't find package.xml or can't find its depends... So I want to know is there a way to list packages name and their paths in the yaml file, and rosdistro module can parse and find package's depends correctly ?

I'm not sure this is actually a problem of (relative) paths/locations. As I wrote in my comment: the rosdistro files list packages by their name, not their location on an FS. As long as the names are fine, everything should work. Can you gives us an example of an error message you receive? What script/tool are you running that gives you that error?


To give you an example: MoveIt has many packages that are not at the root of the repository. See kinetic/distribution.yaml for how the packages are listed.

edit flag offensive delete link more

Comments

Well, I just wrote a demo to want to prove the problem. But I found out I was wrong. I used the rosdistro module uncorrectlly... Sorry for the noise and Thank you for the detailed explanation!

zcm gravatar imagezcm ( 2018-04-13 04:51:15 -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

1 follower

Stats

Asked: 2018-04-12 22:26:41 -0600

Seen: 63 times

Last updated: Apr 13 '18