Interface for naoqi driver which is registered as a naoqi2 Module, once the external roscore ip is set, this class will advertise and publish ros messages. More...
#include <naoqi_driver.hpp>
Classes | |
struct | ScheduledConverter |
Public Member Functions | |
std::string | _whoIsYourDaddy () |
void | addMemoryConverters (std::string filepath) |
qicli call function to add on-the-fly some memory keys extractors More... | |
Driver (qi::SessionPtr session, const std::string &prefix) | |
Constructor for naoqi driver. More... | |
std::vector< std::string > | getAvailableConverters () |
get all available converters More... | |
float | getBufferDuration () |
std::vector< std::string > | getFilesList () |
std::string | getMasterURI () const |
qicli call function to get current master uri More... | |
std::vector< std::string > | getSubscribedPublishers () const |
get all subscribed publishers More... | |
void | init () |
std::string | minidump (const std::string &prefix) |
Write a ROSbag with the last bufferized data (10s by default) More... | |
std::string | minidumpConverters (const std::string &prefix, const std::vector< std::string > &names) |
void | parseJsonFile (std::string filepath, boost::property_tree::ptree &pt) |
void | registerConverter (converter::Converter &conv) |
registers generall converter units they are connected via callbacks to various actions such as record, log, publish More... | |
void | registerConverter (converter::Converter conv, publisher::Publisher pub, recorder::Recorder rec) |
register a converter with an associated publisher and recorder More... | |
bool | registerEventConverter (const std::string &key, const dataType::DataType &type) |
qicli call function to register a converter for a given memory event More... | |
bool | registerMemoryConverter (const std::string &key, float frequency, const dataType::DataType &type) |
qicli call function to register a converter for a given memory key More... | |
void | registerPublisher (const std::string &conv_name, publisher::Publisher &pub) |
prepare and register a publisher More... | |
void | registerPublisher (converter::Converter conv, publisher::Publisher pub) |
register a converter with an associated publisher instance More... | |
void | registerRecorder (const std::string &conv_name, recorder::Recorder &rec, float frequency) |
prepare and register a recorder More... | |
void | registerRecorder (converter::Converter conv, recorder::Recorder rec) |
register a converter with an associated recorder instance More... | |
void | registerService (service::Service srv) |
registers a service More... | |
void | registerSubscriber (subscriber::Subscriber sub) |
registers a subscriber More... | |
void | removeAllFiles () |
void | removeFiles (std::vector< std::string > files) |
void | setBufferDuration (float duration) |
void | setMasterURI (const std::string &uri) |
qicli call function to set current master uri More... | |
void | setMasterURINet (const std::string &uri, const std::string &network_interface) |
qicli call function to set current master uri More... | |
void | startLogging () |
void | startPublishing () |
qicli call function to start/enable publishing all registered publisher More... | |
void | startRecording () |
qicli call function to start recording all registered converter in a ROSbag More... | |
void | startRecordingConverters (const std::vector< std::string > &names) |
qicli call function to start recording given topics in a ROSbag More... | |
void | startRosLoop () |
void | stopLogging () |
void | stopPublishing () |
qicli call function to stop/disable publishing all registered publisher More... | |
std::string | stopRecording () |
qicli call function to stop recording all registered publisher in a ROSbag More... | |
void | stopRosLoop () |
void | stopService () |
~Driver () | |
Destructor for naoqi driver, destroys all ros nodehandle and shutsdown all publisher. More... | |
Private Types | |
typedef std::map< std::string, event::Event >::const_iterator | EventConstIter |
typedef std::map< std::string, event::Event >::iterator | EventIter |
typedef std::map< std::string, publisher::Publisher >::const_iterator | PubConstIter |
typedef std::map< std::string, publisher::Publisher >::iterator | PubIter |
typedef std::map< std::string, recorder::Recorder >::const_iterator | RecConstIter |
typedef std::map< std::string, recorder::Recorder >::iterator | RecIter |
Private Member Functions | |
template<typename T1 , typename T2 , typename T3 > | |
void | _registerMemoryConverter (const std::string &key, float frequency) |
void | insertEventConverter (const std::string &key, event::Event event) |
void | loadBootConfig () |
void | registerDefaultConverter () |
void | registerDefaultServices () |
void | registerDefaultSubscriber () |
void | rosLoop () |
Private Attributes | |
boost::property_tree::ptree | boot_config_ |
float | buffer_duration_ |
std::priority_queue< ScheduledConverter > | conv_queue_ |
std::vector< converter::Converter > | converters_ |
std::map< std::string, event::Event > | event_map_ |
const size_t | freq_ |
bool | has_stereo |
bool | keep_looping |
bool | log_enabled_ |
boost::mutex | mutex_conv_queue_ |
boost::mutex | mutex_record_ |
boost::mutex | mutex_reinit_ |
boost::scoped_ptr< ros::NodeHandle > | nhPtr_ |
std::map< std::string, publisher::Publisher > | pub_map_ |
bool | publish_enabled_ |
boost::thread | publisherThread_ |
std::map< std::string, recorder::Recorder > | rec_map_ |
bool | record_enabled_ |
boost::shared_ptr< recorder::GlobalRecorder > | recorder_ |
const robot::Robot & | robot_ |
std::vector< service::Service > | services_ |
qi::SessionPtr | sessionPtr_ |
std::vector< subscriber::Subscriber > | subscribers_ |
boost::shared_ptr< tf2_ros::Buffer > | tf2_buffer_ |
Interface for naoqi driver which is registered as a naoqi2 Module, once the external roscore ip is set, this class will advertise and publish ros messages.
Definition at line 65 of file naoqi_driver.hpp.
|
private |
Definition at line 286 of file naoqi_driver.hpp.
|
private |
Definition at line 287 of file naoqi_driver.hpp.
|
private |
Definition at line 282 of file naoqi_driver.hpp.
|
private |
Definition at line 283 of file naoqi_driver.hpp.
|
private |
Definition at line 284 of file naoqi_driver.hpp.
|
private |
Definition at line 285 of file naoqi_driver.hpp.
naoqi::Driver::Driver | ( | qi::SessionPtr | session, |
const std::string & | prefix | ||
) |
Constructor for naoqi driver.
session[in] | session pointer for naoqi2 service registration |
Definition at line 118 of file naoqi_driver.cpp.
naoqi::Driver::~Driver | ( | ) |
Destructor for naoqi driver, destroys all ros nodehandle and shutsdown all publisher.
Definition at line 140 of file naoqi_driver.cpp.
|
inlineprivate |
Definition at line 261 of file naoqi_driver.hpp.
|
inline |
Definition at line 149 of file naoqi_driver.hpp.
void naoqi::Driver::addMemoryConverters | ( | std::string | filepath | ) |
qicli call function to add on-the-fly some memory keys extractors
Definition at line 1218 of file naoqi_driver.cpp.
std::vector< std::string > naoqi::Driver::getAvailableConverters | ( | ) |
get all available converters
Definition at line 949 of file naoqi_driver.cpp.
float naoqi::Driver::getBufferDuration | ( | ) |
Definition at line 417 of file naoqi_driver.cpp.
std::vector< std::string > naoqi::Driver::getFilesList | ( | ) |
Definition at line 1373 of file naoqi_driver.cpp.
std::string naoqi::Driver::getMasterURI | ( | ) | const |
qicli call function to get current master uri
Definition at line 968 of file naoqi_driver.cpp.
std::vector< std::string > naoqi::Driver::getSubscribedPublishers | ( | ) | const |
get all subscribed publishers
Definition at line 1062 of file naoqi_driver.cpp.
void naoqi::Driver::init | ( | ) |
Definition at line 151 of file naoqi_driver.cpp.
|
private |
Definition at line 449 of file naoqi_driver.cpp.
|
private |
Definition at line 161 of file naoqi_driver.cpp.
std::string naoqi::Driver::minidump | ( | const std::string & | prefix | ) |
Write a ROSbag with the last bufferized data (10s by default)
Definition at line 260 of file naoqi_driver.cpp.
std::string naoqi::Driver::minidumpConverters | ( | const std::string & | prefix, |
const std::vector< std::string > & | names | ||
) |
Definition at line 319 of file naoqi_driver.cpp.
void naoqi::Driver::parseJsonFile | ( | std::string | filepath, |
boost::property_tree::ptree & | pt | ||
) |
Definition at line 1209 of file naoqi_driver.cpp.
void naoqi::Driver::registerConverter | ( | converter::Converter & | conv | ) |
registers generall converter units they are connected via callbacks to various actions such as record, log, publish
Definition at line 422 of file naoqi_driver.cpp.
void naoqi::Driver::registerConverter | ( | converter::Converter | conv, |
publisher::Publisher | pub, | ||
recorder::Recorder | rec | ||
) |
register a converter with an associated publisher and recorder
Definition at line 456 of file naoqi_driver.cpp.
|
private |
Info publisher
LOGS
DIAGNOSTICS
IMU TORSO
IMU BASE
Front Camera
Front Camera
Depth Camera
Stereo Camera
Infrared Camera
Joint States
Laser
Sonar
Audio
TOUCH
Odom
Definition at line 537 of file naoqi_driver.cpp.
|
private |
Definition at line 942 of file naoqi_driver.cpp.
|
private |
Definition at line 927 of file naoqi_driver.cpp.
bool naoqi::Driver::registerEventConverter | ( | const std::string & | key, |
const dataType::DataType & | type | ||
) |
qicli call function to register a converter for a given memory event
Definition at line 1287 of file naoqi_driver.cpp.
bool naoqi::Driver::registerMemoryConverter | ( | const std::string & | key, |
float | frequency, | ||
const dataType::DataType & | type | ||
) |
qicli call function to register a converter for a given memory key
Definition at line 475 of file naoqi_driver.cpp.
void naoqi::Driver::registerPublisher | ( | const std::string & | conv_name, |
publisher::Publisher & | pub | ||
) |
prepare and register a publisher
conv_name | the name of the converter related to the publisher |
pub | the publisher to add |
Definition at line 431 of file naoqi_driver.cpp.
void naoqi::Driver::registerPublisher | ( | converter::Converter | conv, |
publisher::Publisher | pub | ||
) |
register a converter with an associated publisher instance
Definition at line 463 of file naoqi_driver.cpp.
void naoqi::Driver::registerRecorder | ( | const std::string & | conv_name, |
recorder::Recorder & | rec, | ||
float | frequency | ||
) |
prepare and register a recorder
conv_name | the name of the converter related to the recorder |
rec | the recorder to add |
Definition at line 441 of file naoqi_driver.cpp.
void naoqi::Driver::registerRecorder | ( | converter::Converter | conv, |
recorder::Recorder | rec | ||
) |
register a converter with an associated recorder instance
Definition at line 469 of file naoqi_driver.cpp.
void naoqi::Driver::registerService | ( | service::Service | srv | ) |
registers a service
service | to register |
Definition at line 936 of file naoqi_driver.cpp.
void naoqi::Driver::registerSubscriber | ( | subscriber::Subscriber | sub | ) |
registers a subscriber
subscriber | to register |
Definition at line 906 of file naoqi_driver.cpp.
void naoqi::Driver::removeAllFiles | ( | ) |
Definition at line 1388 of file naoqi_driver.cpp.
void naoqi::Driver::removeFiles | ( | std::vector< std::string > | files | ) |
Definition at line 1401 of file naoqi_driver.cpp.
|
private |
Definition at line 179 of file naoqi_driver.cpp.
void naoqi::Driver::setBufferDuration | ( | float | duration | ) |
Definition at line 404 of file naoqi_driver.cpp.
void naoqi::Driver::setMasterURI | ( | const std::string & | uri | ) |
qicli call function to set current master uri
string | in form of http://<ip>:11311 |
Definition at line 973 of file naoqi_driver.cpp.
void naoqi::Driver::setMasterURINet | ( | const std::string & | uri, |
const std::string & | network_interface | ||
) |
qicli call function to set current master uri
string | in form of http://<ip>:11311 |
network_interface | the network interface ("eth0", "tether" ...) |
Definition at line 978 of file naoqi_driver.cpp.
void naoqi::Driver::startLogging | ( | ) |
Definition at line 1176 of file naoqi_driver.cpp.
void naoqi::Driver::startPublishing | ( | ) |
qicli call function to start/enable publishing all registered publisher
Definition at line 1044 of file naoqi_driver.cpp.
void naoqi::Driver::startRecording | ( | ) |
qicli call function to start recording all registered converter in a ROSbag
Definition at line 1078 of file naoqi_driver.cpp.
void naoqi::Driver::startRecordingConverters | ( | const std::vector< std::string > & | names | ) |
qicli call function to start recording given topics in a ROSbag
Definition at line 1103 of file naoqi_driver.cpp.
void naoqi::Driver::startRosLoop | ( | ) |
Definition at line 1186 of file naoqi_driver.cpp.
void naoqi::Driver::stopLogging | ( | ) |
Definition at line 1181 of file naoqi_driver.cpp.
void naoqi::Driver::stopPublishing | ( | ) |
qicli call function to stop/disable publishing all registered publisher
Definition at line 1053 of file naoqi_driver.cpp.
std::string naoqi::Driver::stopRecording | ( | ) |
qicli call function to stop recording all registered publisher in a ROSbag
Definition at line 1157 of file naoqi_driver.cpp.
void naoqi::Driver::stopRosLoop | ( | ) |
Definition at line 1198 of file naoqi_driver.cpp.
void naoqi::Driver::stopService | ( | ) |
Definition at line 171 of file naoqi_driver.cpp.
|
private |
Definition at line 252 of file naoqi_driver.hpp.
|
private |
Definition at line 292 of file naoqi_driver.hpp.
|
private |
Priority queue to process the publishers according to their frequency
Definition at line 311 of file naoqi_driver.hpp.
|
private |
Definition at line 278 of file naoqi_driver.hpp.
|
private |
Definition at line 281 of file naoqi_driver.hpp.
|
private |
Definition at line 245 of file naoqi_driver.hpp.
|
private |
Definition at line 243 of file naoqi_driver.hpp.
|
private |
Definition at line 242 of file naoqi_driver.hpp.
|
private |
Definition at line 241 of file naoqi_driver.hpp.
|
private |
Definition at line 275 of file naoqi_driver.hpp.
|
private |
Definition at line 276 of file naoqi_driver.hpp.
|
private |
Definition at line 274 of file naoqi_driver.hpp.
|
private |
Definition at line 273 of file naoqi_driver.hpp.
|
private |
Definition at line 279 of file naoqi_driver.hpp.
|
private |
Definition at line 239 of file naoqi_driver.hpp.
|
private |
Definition at line 246 of file naoqi_driver.hpp.
|
private |
Definition at line 280 of file naoqi_driver.hpp.
|
private |
Definition at line 240 of file naoqi_driver.hpp.
|
private |
Definition at line 249 of file naoqi_driver.hpp.
|
private |
Definition at line 237 of file naoqi_driver.hpp.
|
private |
Definition at line 290 of file naoqi_driver.hpp.
|
private |
Definition at line 235 of file naoqi_driver.hpp.
|
private |
Definition at line 289 of file naoqi_driver.hpp.
|
private |
tf2 buffer that will be shared between different publishers/subscribers This is only for performance improvements
Definition at line 316 of file naoqi_driver.hpp.