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

setup-robot-description only supported for ament_cmake pkgs? #207

Open
YaraShahin opened this issue May 4, 2024 · 1 comment
Open

setup-robot-description only supported for ament_cmake pkgs? #207

YaraShahin opened this issue May 4, 2024 · 1 comment

Comments

@YaraShahin
Copy link
Contributor

YaraShahin commented May 4, 2024

Hello,

When I use setup-robot-description to make a robot bringup package on top of an ament_python package created through create-new-package, the following happens:

  1. error: sed: can't read CMakeLists.txt: No such file or directory
  2. After the process successfully finishes and the workspace is built and sourced, the launch files can't run because of this error: file 'view_my_robot.launch.xml' was not found in the share directory of package '<pkg-name>' which is at '<pkg-path>/share/robot_desc_pkg_py'

I believe these errors happen because:

  1. The first error: In https://github.com/StoglRobotics/ros_team_workspace/blob/master/scripts/setup-robot-description.bash?plain=1#L181, we try to edit CMakeLists.txt regardless of the package type (python ros2 packages don't have CMakeLists.txt).
  2. The second error happens because the targets in setup.py are not updated to include the launch file, which is subsequently not installed during colcon build.

Steps to reproduce (i was using docker rolling ubuntu22):

  1. Setup a new workspace and a new package using create-new-package and choose ament_python as the build type.
  2. browse to the ws root and colcon build && source install/setup.bash && cd src/<pkg-name>
  3. run setup-robot-description my_robot
  4. You should see the CMakeLists.txt error
  5. After the process finishes, repeat step 2.
  6. Try to ros2 launch robot_desc_pkg_py view_my_robot.launch.xml

I'm not sure if this an issue or expected behavior, but as far as I know, we can create robot description packages using ament_python.

On a different note, here a couple of suggestions that would save some debugging:

  1. For docker images, can we add to the Dockerfile instructions to install the most common packages (packages used to build robot_description and bringup and ros2_control) rightaway? i.e. xacro, robot_state_publisher_gui,...
  2. For the documentation regarding how to setup-robot-description or bringup, we could add steps such as to rosdep install, apt-get install (for any missing packages), colcon build, and source install/setup.bash.
@destogl
Copy link
Member

destogl commented May 16, 2024

Hi @YaraShahin, thanks for your feedback! You are right; we only support CMake packages for the robot description. the right thing to fix this would be to update the documentation to say this explicitly.

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