Skip to content

Refactor of robot repositories #18

@alaurenzi

Description

@alaurenzi

@liesrock @DavideAntonucci @EdoardoRomiti
Hi all,
I am doing some work to improve our workflow concerning robot URDF/SRDF/capsules generation, and simulation, too.

Why

The weak points of our previous infrastructure, in my opinion, are the following:

  1. one single big bash script doing everything and every time it is invoked
    • generate urdf and srdf for all existing config files (from urdf/config/*.urdf.xacro)
    • generate capsule models
  2. does not report errors (or exit on error)
  3. does the generation even though no file has actually changed
  4. generates intermediate files inside the source tree (thus polluting it)
  5. unclear which files are generated (byproducts of generation) and which are actual source files
  6. no unit tests and continuous integration
  7. no debian generation
  8. issues with gazebo11 due to unsupported floating joint

How

I implemented some solutions inside a refactor branch. Key points are:

  1. basic structure does not change (all xacros stay where they are)
  2. main xacro must support an additional argument config with a default value pointing to a default configuration file
  3. cmake-based xacro generation with single targets for every config file; benefits are:
    • generation skipped if source files haven't changed
    • files are generated inside the build tree and published to the source tree with an explicit command
    • errors causes early exit
  4. dropped support for drag-and-drop simulation in gazebo
  5. perception simulation with additional arguments to be provided to the launch file (realsense:=true velodyne:=true)
  6. a basic integration test demonstrating that simulation is spawned successfully and xbot2 can start correctly
  7. Travis CI
  8. cpack based deb generation (example here)
  9. conditional inclusion of a floating joint (just for control)

Usage

  1. cloning the repository yields a ready-to-use package, generation is not required
  2. make install support in case the source folder is not part of ROS_PACKAGE_PATH
  3. from a developer's perspective, generation must be performed with a make <target-name> from the build folder, such as
    • make generate_urdf_<config_name>
    • make generate_urdf_<config_name>_capsule
    • make publish_urdf_<config_name> (copy to source tree)
  4. make package produces a deb package

Feedback

I'd like to hear some feedback from you before going further ahead with this project.
Do you see a better way to accomplish some of the goals?
Do you see further shortcomings of the current architecture that can be solved?

@EdoardoRomiti I am not sure how and if this affects you work (generation not from xacros but from discovered topology)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions