23 _humanoid_source_ptr( humanoid_source_ptr ),
24 _humanoid_sinks( humanoid_sinks )
32 ros::Rate loop_rate( 30 );
41 auto const & humanoids( _humanoid_source_ptr->update() );
42 for(
auto & sink_ptr : _humanoid_sinks )
44 if( sink_ptr ) sink_ptr->publish( humanoids );
53 int main(
int argc,
char ** argv )
55 ros::init( argc, argv,
"semio_humanoid_server_node" );
57 ros::NodeHandle nh_rel(
"~" );
60 std::vector<semio::HumanoidSink::Ptr> humanoid_sinks{
61 std::make_shared<semio::ros::HumanoidSinkROS>( nh_rel,
"humanoids/raw" ) };
64 if( nh_rel.hasParam(
"humanoid_sink/filter/smoothing" ) )
75 semio_humanoid_server_node.
spin();
Utility class to simplify the creation of semio::HumanoidSink instances.
SemioHumanoidServerNode(semio::HumanoidSource::Ptr humanoid_source_ptr, std::vector< semio::HumanoidSink::Ptr > const &humanoid_sinks)
decltype(std::make_shared< HumanoidSource >()) typedef Ptr
std::vector< semio::HumanoidSink::Ptr > _humanoid_sinks
Vector of pointers to the output sinks for humanoids.
Utility class to simplify the creation of semio::HumanoidSource instances.
int main(int argc, char **argv)
Serve humanoids using source/sink model.
semio::HumanoidSource::Ptr _humanoid_source_ptr
Pointer to the input source for humanoids.