Go to the documentation of this file.
19 #ifndef NAOQI_DRIVER_HPP
20 #define NAOQI_DRIVER_HPP
28 #include <boost/property_tree/ptree.hpp>
29 #include <boost/thread/thread.hpp>
30 #include <boost/thread/mutex.hpp>
31 #include <boost/scoped_ptr.hpp>
36 #include <qi/session.hpp>
151 return "A sugar bear";
182 void setMasterURINet(
const std::string& uri,
const std::string& network_interface );
224 void parseJsonFile(std::string filepath, boost::property_tree::ptree& pt);
260 template <
typename T1,
typename T2,
typename T3>
273 boost::scoped_ptr<ros::NodeHandle>
nhPtr_;
279 std::map< std::string, publisher::Publisher >
pub_map_;
280 std::map< std::string, recorder::Recorder >
rec_map_;
282 typedef std::map< std::string, publisher::Publisher>::const_iterator
PubConstIter;
283 typedef std::map< std::string, publisher::Publisher>::iterator
PubIter;
284 typedef std::map< std::string, recorder::Recorder>::const_iterator
RecConstIter;
285 typedef std::map< std::string, recorder::Recorder>::iterator
RecIter;
287 typedef std::map< std::string, event::Event>::iterator
EventIter;
std::priority_queue< ScheduledConverter > conv_queue_
std::string stopRecording()
qicli call function to stop recording all registered publisher in a ROSbag
void parseJsonFile(std::string filepath, boost::property_tree::ptree &pt)
std::string minidump(const std::string &prefix)
Write a ROSbag with the last bufferized data (10s by default)
void setMasterURINet(const std::string &uri, const std::string &network_interface)
qicli call function to set current master uri
void stopPublishing()
qicli call function to stop/disable publishing all registered publisher
std::map< std::string, event::Event > event_map_
bool registerMemoryConverter(const std::string &key, float frequency, const dataType::DataType &type)
qicli call function to register a converter for a given memory key
Converter concept interface.
boost::mutex mutex_conv_queue_
void registerDefaultServices()
std::vector< subscriber::Subscriber > subscribers_
std::map< std::string, event::Event >::const_iterator EventConstIter
std::map< std::string, event::Event >::iterator EventIter
Service concept interface.
void setMasterURI(const std::string &uri)
qicli call function to set current master uri
std::vector< std::string > getFilesList()
const robot::Robot & robot_
Subscriber concept interface.
Interface for naoqi driver which is registered as a naoqi2 Module, once the external roscore ip is se...
void registerConverter(converter::Converter &conv)
registers generall converter units they are connected via callbacks to various actions such as record...
ScheduledConverter(const ros::Time &schedule, size_t conv_index)
boost::shared_ptr< recorder::GlobalRecorder > recorder_
void startPublishing()
qicli call function to start/enable publishing all registered publisher
boost::shared_ptr< tf2_ros::Buffer > tf2_buffer_
bool registerEventConverter(const std::string &key, const dataType::DataType &type)
qicli call function to register a converter for a given memory event
void startRecordingConverters(const std::vector< std::string > &names)
qicli call function to start recording given topics in a ROSbag
void _registerMemoryConverter(const std::string &key, float frequency)
std::string minidumpConverters(const std::string &prefix, const std::vector< std::string > &names)
void registerDefaultConverter()
float getBufferDuration()
void registerPublisher(const std::string &conv_name, publisher::Publisher &pub)
prepare and register a publisher
boost::property_tree::ptree boot_config_
std::vector< service::Service > services_
void addMemoryConverters(std::string filepath)
qicli call function to add on-the-fly some memory keys extractors
~Driver()
Destructor for naoqi driver, destroys all ros nodehandle and shutsdown all publisher.
Recorder concept interface.
std::vector< std::string > getSubscribedPublishers() const
get all subscribed publishers
std::vector< std::string > getAvailableConverters()
get all available converters
Driver(qi::SessionPtr session, const std::string &prefix)
Constructor for naoqi driver.
std::map< std::string, recorder::Recorder >::iterator RecIter
void registerService(service::Service srv)
registers a service
void removeFiles(std::vector< std::string > files)
void setBufferDuration(float duration)
std::map< std::string, recorder::Recorder > rec_map_
qi::SessionPtr sessionPtr_
static std::string prefix
std::map< std::string, publisher::Publisher >::iterator PubIter
std::map< std::string, publisher::Publisher > pub_map_
Converter concept interface.
boost::scoped_ptr< ros::NodeHandle > nhPtr_
bool operator<(const ScheduledConverter &sp_in) const
boost::thread publisherThread_
std::map< std::string, recorder::Recorder >::const_iterator RecConstIter
boost::mutex mutex_reinit_
std::vector< converter::Converter > converters_
void registerDefaultSubscriber()
std::string _whoIsYourDaddy()
void insertEventConverter(const std::string &key, event::Event event)
void registerRecorder(const std::string &conv_name, recorder::Recorder &rec, float frequency)
prepare and register a recorder
std::map< std::string, publisher::Publisher >::const_iterator PubConstIter
GlobalRecorder concept interface.
Publisher concept interface.
void startRecording()
qicli call function to start recording all registered converter in a ROSbag
void registerSubscriber(subscriber::Subscriber sub)
registers a subscriber
std::string getMasterURI() const
qicli call function to get current master uri
boost::mutex mutex_record_
naoqi_driver
Author(s): Karsten Knese
autogenerated on Sat Feb 3 2024 03:50:06