I found that when I use "this" pointer to get interface like the example said will cause problem.
usage: spawner [-h] [--stopped] [--wait-for topic] [--namespace ns] [--timeout T] [--no-timeout] [--shutdown-timeout SHUTDOWN_TIMEOUT] controller [controller ...] spawner: error: the following arguments are required: controller
But use "transmission_interface::RobotTransmissions robottransmissions" works fine.
My code is something like that.
void HardwareInterface::read(const ros::Time& time, const ros::Duration& period) { this->get<transmission_interface::ActuatorToJointStateInterface>()->propagate(); // Cause Problem robot_transmissions_.get<transmission_interface::ActuatorToJointStateInterface>()->propagate(); // Works Fine }
Is any other things should I do to use "this" pointer?
It seems that "TransmissionInterfaceLoader" doesn't register "ActuatorToJointStateInterface" directly to "RobotHW" class. I got some kind of misunderstand of the example code.
I found that when I use "this" pointer to get interface like the example said will cause problem.
usage: spawner [-h] [--stopped] [--wait-for topic] [--namespace ns] [--timeout T] [--no-timeout] [--shutdown-timeout SHUTDOWN_TIMEOUT] controller [controller ...] spawner: error: the following arguments are required: controller
But use "transmission_interface::RobotTransmissions robottransmissions" works fine.My code is something like that.
void HardwareInterface::read(const ros::Time& time, const ros::Duration& period) { this->get<transmission_interface::ActuatorToJointStateInterface>()->propagate(); // Cause Problem robot_transmissions_.get<transmission_interface::ActuatorToJointStateInterface>()->propagate(); // Works Fine }
Is any other things should I do to use "this" pointer?