Go to the documentation of this file.
99 active = fmod(tick, 1) <
config_.duty_cycle;
153 ROS_DEBUG(
"LOADING TRIGGER CONTROLLER NODE");
160 ROS_DEBUG(
"TriggerController::init starting");
165 ROS_ERROR(
"TriggerController was not given an actuator.");
172 ROS_ERROR(
"TriggerController could not find digital out named \"%s\".",
183 #define bparam(name, var, val) \
186 n.param(name, tmp, val);\
204 ROS_DEBUG(
"TriggerController::init completed successfully"
205 " rr=%f ph=%f al=%i r=%i p=%i dc=%f.",
213 ethercat_trigger_controllers::SetWaveform::Response &resp)
218 config_.rep_rate = req.rep_rate;
220 config_.duty_cycle = req.duty_cycle;
221 config_.active_low = !!req.active_low;
223 config_.running = !!req.running;
225 ROS_DEBUG(
"TriggerController::setWaveformSrv completed successfully"
226 " rr=%f ph=%f al=%i r=%i p=%i dc=%f.",
config_.rep_rate,
config_.phase,
ros::ServiceServer set_waveform_handle_
bool getParam(const std::string &key, bool &b) const
bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
ros::NodeHandle node_handle_
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
ethercat_trigger_controllers::SetWaveform::Request trigger_configuration
pr2_hardware_interface::DigitalOutCommand * digital_out_command_
PLUGINLIB_EXPORT_CLASS(pr2_mechanism_model::PR2BeltCompensatorTransmission, pr2_mechanism_model::Transmission) namespace pr2_mechanism_model
std::string actuator_name_
DigitalOutCommand command_
bool setWaveformSrv(trigger_configuration &req, ethercat_trigger_controllers::SetWaveform::Response &resp)
boost::scoped_ptr< realtime_tools::RealtimePublisher< std_msgs::Header > > falling_edge_pub_
boost::scoped_ptr< realtime_tools::RealtimePublisher< std_msgs::Header > > rising_edge_pub_
#define bparam(name, var, val)
trigger_configuration config_
pr2_hardware_interface::HardwareInterface * hw_
T param(const std::string ¶m_name, const T &default_val) const
pr2_mechanism_model::RobotState * robot_
DigitalOut * getDigitalOut(const std::string &name) const