cnoid_ros_utils
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CnoidRosUtils::ClockPublisherItem Class Reference

Plugin item to publish clock topic. More...

#include <ClockPublisherItem.h>

Inheritance diagram for CnoidRosUtils::ClockPublisherItem:
Inheritance graph
[legend]
Collaboration diagram for CnoidRosUtils::ClockPublisherItem:
Collaboration graph
[legend]

Public Member Functions

 ClockPublisherItem ()
 
 ClockPublisherItem (const ClockPublisherItem &org)
 
 ~ClockPublisherItem ()
 

Static Public Member Functions

static void initialize (cnoid::ExtensionManager *ext)
 

Static Public Attributes

static bool initialized_ = false
 

Protected Member Functions

virtual cnoid::Item * doDuplicate () const override
 
virtual void doPutProperties (cnoid::PutPropertyFunction &putProperty) override
 
virtual bool store (cnoid::Archive &archive) override
 
virtual bool restore (const cnoid::Archive &archive) override
 
void setup ()
 
bool start ()
 
void stop ()
 
void onPostDynamics ()
 
int getPubSkip () const
 

Protected Attributes

cnoid::WorldItemPtr world_
 
cnoid::SimulatorItemPtr sim_
 
std::set< std::string > hooked_sims_
 
int post_dynamics_func_id_ = -1
 
std::shared_ptr< ros::NodeHandle > nh_
 
std::string clock_topic_name_ = ""
 
double pub_rate_ = 1000.0
 
ros::Publisher clock_pub_
 
bool use_sim_time_ = true
 
int sim_cnt_ = 0
 
int pub_skip_ = 0
 

Detailed Description

Plugin item to publish clock topic.

Properties

Definition at line 22 of file ClockPublisherItem.h.

Constructor & Destructor Documentation

◆ ClockPublisherItem() [1/2]

ClockPublisherItem::ClockPublisherItem ( )

Definition at line 30 of file ClockPublisherItem.cpp.

◆ ClockPublisherItem() [2/2]

ClockPublisherItem::ClockPublisherItem ( const ClockPublisherItem org)

Definition at line 35 of file ClockPublisherItem.cpp.

◆ ~ClockPublisherItem()

ClockPublisherItem::~ClockPublisherItem ( )

Definition at line 43 of file ClockPublisherItem.cpp.

Member Function Documentation

◆ doDuplicate()

cnoid::Item * ClockPublisherItem::doDuplicate ( ) const
overrideprotectedvirtual

Definition at line 48 of file ClockPublisherItem.cpp.

◆ doPutProperties()

void ClockPublisherItem::doPutProperties ( cnoid::PutPropertyFunction &  putProperty)
overrideprotectedvirtual

Definition at line 53 of file ClockPublisherItem.cpp.

◆ getPubSkip()

int ClockPublisherItem::getPubSkip ( ) const
protected

Definition at line 161 of file ClockPublisherItem.cpp.

◆ initialize()

void ClockPublisherItem::initialize ( cnoid::ExtensionManager *  ext)
static

Definition at line 13 of file ClockPublisherItem.cpp.

◆ onPostDynamics()

void ClockPublisherItem::onPostDynamics ( )
protected

Definition at line 147 of file ClockPublisherItem.cpp.

◆ restore()

bool ClockPublisherItem::restore ( const cnoid::Archive &  archive)
overrideprotectedvirtual

Definition at line 77 of file ClockPublisherItem.cpp.

◆ setup()

void ClockPublisherItem::setup ( )
protected

Definition at line 86 of file ClockPublisherItem.cpp.

◆ start()

bool ClockPublisherItem::start ( )
protected

Definition at line 109 of file ClockPublisherItem.cpp.

◆ stop()

void ClockPublisherItem::stop ( )
protected

Definition at line 137 of file ClockPublisherItem.cpp.

◆ store()

bool ClockPublisherItem::store ( cnoid::Archive &  archive)
overrideprotectedvirtual

Definition at line 68 of file ClockPublisherItem.cpp.

Member Data Documentation

◆ clock_pub_

ros::Publisher CnoidRosUtils::ClockPublisherItem::clock_pub_
protected

Definition at line 66 of file ClockPublisherItem.h.

◆ clock_topic_name_

std::string CnoidRosUtils::ClockPublisherItem::clock_topic_name_ = ""
protected

Definition at line 64 of file ClockPublisherItem.h.

◆ hooked_sims_

std::set<std::string> CnoidRosUtils::ClockPublisherItem::hooked_sims_
protected

Definition at line 59 of file ClockPublisherItem.h.

◆ initialized_

bool CnoidRosUtils::ClockPublisherItem::initialized_ = false
inlinestatic

Definition at line 27 of file ClockPublisherItem.h.

◆ nh_

std::shared_ptr<ros::NodeHandle> CnoidRosUtils::ClockPublisherItem::nh_
protected

Definition at line 63 of file ClockPublisherItem.h.

◆ post_dynamics_func_id_

int CnoidRosUtils::ClockPublisherItem::post_dynamics_func_id_ = -1
protected

Definition at line 61 of file ClockPublisherItem.h.

◆ pub_rate_

double CnoidRosUtils::ClockPublisherItem::pub_rate_ = 1000.0
protected

Definition at line 65 of file ClockPublisherItem.h.

◆ pub_skip_

int CnoidRosUtils::ClockPublisherItem::pub_skip_ = 0
protected

Definition at line 70 of file ClockPublisherItem.h.

◆ sim_

cnoid::SimulatorItemPtr CnoidRosUtils::ClockPublisherItem::sim_
protected

Definition at line 57 of file ClockPublisherItem.h.

◆ sim_cnt_

int CnoidRosUtils::ClockPublisherItem::sim_cnt_ = 0
protected

Definition at line 69 of file ClockPublisherItem.h.

◆ use_sim_time_

bool CnoidRosUtils::ClockPublisherItem::use_sim_time_ = true
protected

Definition at line 67 of file ClockPublisherItem.h.

◆ world_

cnoid::WorldItemPtr CnoidRosUtils::ClockPublisherItem::world_
protected

Definition at line 56 of file ClockPublisherItem.h.


The documentation for this class was generated from the following files: