5 std::shared_ptr<ros::NodeHandle> n) {
13 this->
command_sub = n->subscribe<CommandMsg>(
"hebiros_gazebo_plugin/command/"+
name, 100,
17 n->advertiseService<std_srvs::Empty::Request, std_srvs::Empty::Response>(
18 "hebiros_gazebo_plugin/acknowledge/"+
name, boost::bind(
22 n->advertiseService<SetCommandLifetimeSrv::Request, SetCommandLifetimeSrv::Response>(
23 "hebiros_gazebo_plugin/set_command_lifetime/"+
name, boost::bind(
27 n->advertiseService<SetFeedbackFrequencySrv::Request, SetFeedbackFrequencySrv::Response>(
28 "hebiros_gazebo_plugin/set_feedback_frequency/"+
name, boost::bind(
49 for (
int i = 0; i < data->name.size(); i++) {
50 std::string joint_name = data->name[i];
53 std::shared_ptr<HebirosGazeboJoint> hebiros_joint =
joints[joint_name];
54 hebiros_joint->command_index = i;
64 std_srvs::Empty::Response &res) {
79 SetCommandLifetimeSrv::Response &res) {
86 SetFeedbackFrequencySrv::Response &res) {
bool SrvSetCommandLifetime(SetCommandLifetimeSrv::Request &req, SetCommandLifetimeSrv::Response &res)
ros::ServiceServer feedback_frequency_srv
std::map< std::string, std::shared_ptr< HebirosGazeboJoint > > joints
CommandMsg command_target
bool SrvSetFeedbackFrequency(SetFeedbackFrequencySrv::Request &req, SetFeedbackFrequencySrv::Response &res)
void SubCommand(const boost::shared_ptr< CommandMsg const > data)
bool SrvAcknowledge(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
HebirosGazeboGroup(std::string name, std::shared_ptr< ros::NodeHandle > n)
ros::Time prev_feedback_time
static void ChangeSettings(std::shared_ptr< HebirosGazeboGroup > hebiros_group, std::shared_ptr< HebirosGazeboJoint > hebiros_joint)
bool check_acknowledgement
ros::ServiceServer command_lifetime_srv
ros::ServiceServer acknowledge_srv
ros::Subscriber command_sub