-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/tempo' into dev
- Loading branch information
Showing
157 changed files
with
6,657 additions
and
2,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
whitelist: | ||
- isPositioned | ||
- hasColor | ||
#blacklist: | ||
# - isPositioned | ||
# - hasColor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef MEMENTAR_API_ACTIONSPUBLISHER_H | ||
#define MEMENTAR_API_ACTIONSPUBLISHER_H | ||
|
||
#include <string> | ||
|
||
#include <ros/ros.h> | ||
|
||
namespace mementar | ||
{ | ||
|
||
class ActionsPublisher | ||
{ | ||
public: | ||
ActionsPublisher(ros::NodeHandle* n, const std::string& name = ""); | ||
|
||
void insert(const std::string& name, time_t start_stamp = time(0), time_t end_stamp = 0); | ||
void insertEnd(const std::string& name, time_t end_stamp = time(0)); | ||
|
||
private: | ||
ros::NodeHandle* n_; | ||
ros::Publisher pub_; | ||
|
||
void publish(const std::string& name, time_t start_stamp, time_t end_stamp); | ||
}; | ||
|
||
} // namespace mementar | ||
|
||
#endif // MEMENTAR_API_ACTIONSPUBLISHER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef MEMENTAR_API_ACTIONSSUBSCRIBER_H | ||
#define MEMENTAR_API_ACTIONSSUBSCRIBER_H | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <thread> | ||
#include <atomic> | ||
|
||
#include <ros/ros.h> | ||
#include <ros/callback_queue.h> | ||
|
||
#include "mementar/MementarOccasion.h" | ||
#include "mementar/API/Fact.h" | ||
#include "mementar/API/OccasionsSubscriber.h" | ||
|
||
namespace mementar | ||
{ | ||
|
||
class ActionsSubscriber : private OccasionsSubscriber | ||
{ | ||
public: | ||
ActionsSubscriber(std::function<void(const std::string&)> callback, const std::string& name = "", bool spin_thread = true); | ||
ActionsSubscriber(std::function<void(const std::string&)> callback, bool spin_thread); | ||
~ActionsSubscriber(); | ||
|
||
bool subscribeToStart(const std::string& name, size_t count = -1); | ||
bool subscribeToEnd(const std::string& name, size_t count = -1); | ||
bool cancel(); | ||
|
||
bool end() { return OccasionsSubscriber::end(); } | ||
|
||
private: | ||
std::function<void(const std::string&)> callback_; | ||
|
||
void privateCallback(const Fact& fact); | ||
}; | ||
|
||
} // namespace mementar | ||
|
||
#endif // MEMENTAR_API_ACTIONSSUBSCRIBER_H |
Oops, something went wrong.