Commit Graph

33 Commits

Author SHA1 Message Date
Jafar Abdi
8a913d8bf3
getTaskId(): Replace '-' in hostname with '_' (#223) 2020-12-15 20:39:01 +01:00
Robert Haschke
cf5031e89d Create task-specific ServiceClients to fetch solutions
This finally allows to have multiple tasks publishing in the same namespace.
2020-10-24 04:43:30 +02:00
Robert Haschke
b91d87c6eb IntroSpection: indicateReset() on disable 2020-10-24 04:43:30 +02:00
Robert Haschke
c471879b08 Rename process_id -> task_id 2020-10-24 04:43:30 +02:00
Robert Haschke
b071a059f9 Rename TaskPrivate::id -> TaskPrivate::ns
TaskPrivate's id_ actually served as a namespace parameter.
2020-10-24 04:43:30 +02:00
Michael Görner
ee6c50ad31
Apply clang-format-10 (#199) 2020-08-20 11:56:53 +02:00
v4hn
e861d311e0 fix comment typo 2020-08-11 20:43:34 +02:00
v4hn
d031f1b1e3 send a single reset message when introspection is enabled
My previous patches accidentally disabled *all* (3) reset messages,
instead of keeping exactly one. This patch sends exactly one empty description
(reset) message every time an introspection instance is constructed for a task.

Notice the additional increase of the description queue_size from 1 to 2 to avoid
directly dropping the reset message in favor of the new description likely to be send
shortly afterwards.
2020-07-22 12:57:34 +02:00
Robert Haschke
ee7ebb3b96
SolutionMsg: always fill start_scene (#175)
So far, the start_scene field of a SolutionMsg was only filled by  Introspection::fillSolution(),
but not yet by Task::execute().

Addendum(v4hn): The previous approach was actually reasonable too (although the scene should have been marked as `is_diff`) for solutions sent for execution, but keeping the full start_scene around can facilitate debugging from recorded data.
2020-06-18 11:07:05 +02:00
v4hn
8faba159f9 clang-tidy: llvm-namespace-comment 2020-06-11 11:03:50 +02:00
v4hn
2153237643 clang-format: readability-identifier-naming
Probably the most invasive format patch, also changing some internal API.

I deliberately disabled ClassCase and MethodCase checks for the moment
to avoid public API changes in this patch set.
2020-06-11 11:03:50 +02:00
v4hn
b762079478 clang-tidy: readability-named-parameters 2020-06-11 11:03:50 +02:00
v4hn
8578a64ac0 correct sign for StageCallback type
backward compatible, the function type implicitly converts from previous int definitions.
2020-04-01 15:05:20 +02:00
Jafar Abdi
fa9b177575 transmit and display computation in rviz 2020-02-06 16:18:20 +01:00
Robert Haschke
facdc8e278 update RobotState in getJointStateGoal() 2019-11-02 22:02:56 +08:00
Michael Görner
f7b259259e Introduce clang-format (#102)
* fix catkin_lint issues
* introduce clang-format config and apply it
2019-07-18 11:04:35 +02:00
Robert Haschke
95455c2a26 fix Task::operator=(Task&&)
To move a task instance to another one, it's not sufficient to swap all task members,
but we also need to adapt all back pointers, i.e. me_ and parent_ pointers of children,
to point to the (swapped) task instances.
2019-06-04 14:20:47 +02:00
Robert Haschke
062cfe0b60 PropertyTypeRegistry to store serialization/deserialization functions 2019-01-17 23:54:35 +01:00
Robert Haschke
b5b58ea0ca Introspection::solutionFromId() 2018-10-20 23:33:54 +02:00
Robert Haschke
c2dd28abae rework storing of solutions
- solutions_, failures_ as SolutionBaseConstPtrs in StagePrivate
- replace processSolutions() / processFailures() by direct const-access to storage containers
- generic sendForward(), sendBackward(), spawn(), connect() methods in StagePrivate
- reuse StagePrivate's sendForward(), sendBackward(), spawn() in containers

- store created InterfaceStates in StagePrivate::states_
- Interface: ordered<InterfaceState*> (only store pointers)
  allows for common handling of states of valid and failure solutions

- remove additional state+solution storages
- containers: internal->external state mapping as InterfaceState* -> InterfaceState*
2018-05-30 21:02:50 +02:00
Robert Haschke
2ea463fff4 replace std::cout with ros console 2018-02-16 16:01:05 +01:00
Robert Haschke
3a4dc6755b Merge branches 'fix-remote-task-model', 'wip-cost-ordering' and 'wip-properties' 2018-02-12 23:35:01 +01:00
Robert Haschke
fe2c4f312e serialize stage properties 2018-02-12 22:45:15 +01:00
Robert Haschke
2184450bd6 count all failures for statistics 2018-02-12 22:36:12 +01:00
Robert Haschke
97bb6ef2c6 allow handling of failures
- store "failure" solutions to facilitate debugging
- Introspection assigns solution IDs as soon as they are created in a stage
  Thus, solution IDs represent their creation order.
  In contrast, the order of publishing (in StageStatistics) should
  represent the cost order.
- Storing failures is disabled if Introspection is not available.
2018-02-12 22:35:58 +01:00
Robert Haschke
f8952bb712 introducing process_id
The task id was not unique enough to distinguish different tasks.
When a task publisher is killed and restarted, it usually comes up with
the same task id. However, visualization doesn't notice this change and
get confused / crashes when receiving task statistics and solutions.
2018-02-04 09:01:40 +01:00
v4hn
d7719e721f add full license information
so dull... but for the matter of completeness
2017-12-12 21:24:32 +01:00
Robert Haschke
9032dabca5 navigate solutions 2017-11-24 11:24:18 +01:00
Robert Haschke
e52dc8db11 Introspection: start solution id at index 1
... allowing 0 to have special meaning "invalid"
2017-11-20 00:04:57 +01:00
Robert Haschke
46af6a28da Introspection: helper fillSolution() adding task_id 2017-11-20 00:04:35 +01:00
Robert Haschke
d0e3783d4e removed statistics from task description
- make TaskStatistics a latched topic too
- subscribing to topics in order (1. description, 2. statistics, 3. solution)
  should ensure that we receive those latched messages in this order
2017-11-12 21:42:48 +01:00
Robert Haschke
67b5a99d8d receive task solutions
- remove parent_id from StageStatistics message
2017-11-12 21:42:48 +01:00
Robert Haschke
9c5ddd3f6d split repo into different ROS packages: msgs, core, visualization 2017-11-12 21:42:48 +01:00