Skip to content

Compose tasks in rviz GUI #278

Open
Open

Description

@rhaschke

In the very early days of MTC, I strived for a GUI in rviz to compose tasks and make the stages' properties available via nice interactive markers. In response to @JafarAbdi #271 (comment), I will try to summarize the architecture of this approach:

Any help to finish this GUI is highly appreciated.

Activity

  1. self-assigned this
    on Jun 29, 2021
  2. v4hn commented on Jun 29, 2021

    @v4hn
    Contributor

    Some issues that are not tackled in either implementation (from what I can see) are

    • monitoring stages are not modeled but are essential for all non-trivial tasks
    • connections can only succeed between matching types, but during drag and drop the types are not always clear

    A closely related project we discussed back then, but that is not implemented until now, is a full serialization of the task.
    After all you would not want to run your Task from the GUI most of the time.
    @rhaschke Implemented a big step of this later in property serialization to inspect them in RViz, but property-deserialization is not well-supported. The latter is on my close-range agenda and I started rearranging code, but got sidetracked as always..

    Personally I prefer to specify Tasks in C++ because it's so much more flexible (e.g., some stages can use C++ methods and it's cumbersome to provide those in a format where specifications can use them), but I do see the merits of a GUI editor.

    We agreed before that RViz support for editing properties is quite essential, which is why the unused factory methods are in place.

    I would love to see work on the GUI creator continued as well.

  3. rhaschke commented on Jun 30, 2021

    @rhaschke
    ContributorAuthor
    • I think full serialization of a task is not meaningful: As you pointed out, there are some features relying on C++ methods or lambdas, which cannot be serialized.
    • I agree that property deserialization was an open issue. I remember that we wanted to have a phone call on this. Sorry, I didn't manage yet. Let's try again!
    • I think, the rviz GUI should be capable of generating C++ and/or Python code for the preconfigured task. I think that's what @JafarAbdi had in mind with his editor as well?
    • Another open issue we discussed before is: Should we allow property editing for remote tasks? If so, how to communicate changes back to the task application?
    • Monitoring stages could be handled by some extra linking mechanism. But that's not yet implemented.
    • Drag-and-drop doesn't care about matching connection types and I think it should not. If you would forbid non-matching stage sequences, how would you incrementally build a GEN - CON - GEN sequence?
      The correctness of the whole pipeline is eventually checked during initialization. On errors, we could highlight corresponding erroneous stages.
  4. v4hn commented on Jun 30, 2021

    @v4hn
    Contributor
  5. rhaschke commented on Jul 1, 2021

    @rhaschke
    ContributorAuthor

    Another open issue we discussed before is: Should we allow property editing for remote tasks?

    I would prefer such an API a lot over running Tasks in the RViz process. But then you probably want the whole set: services for modifying the Task structure, for setting properties, for initializing a task, for generating code/a serialization for it, trigger planning, ... But especially because such a Task can even segfault with custom stages (user code), this approach seems overengineered and fragile to me for insufficient merit.

    I agree. Due to the mentioned complexity, I did not planned for such an API. I just planned to display properties of remote tasks in a read-only fashion. One major problem with such an envisioned API is that rviz cannot know about the state of the external application. Thus we don't know whether it is safe to change properties, (re)trigger tasks, etc.
    My intention was to have a way of quickly assembling a task in rviz, primarily to replace and advance the existing MotionPlanning plugin. Optionally, one could generate C++ code from the rviz task to further tweak the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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