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/FirstTimeRelease, 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!
Originally posted by zcm on ROS Answers with karma: 29 on 2018-04-12
Post score: 0
Original comments
Comment by gvdhoorn on 2018-04-13:
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 ..
Comment by gvdhoorn on 2018-04-13:
.. 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.
Comment by zcm on 2018-04-13:
@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/FirstTimeRelease , at the very end of the page.
Comment by zcm on 2018-04-13:
"If necessary, a path to that package can be specified after the colon if it is not located in the repository root"
Comment by zcm on 2018-04-13:
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..
Comment by gvdhoorn on 2018-04-13:
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.
Comment by zcm on 2018-04-13:
@gvdhoorn, I have updated my question adding some details, Thanks!