9 ros::init(argc, argv,
"jsk_model_marker_interface");
16 std::vector<std::string> parent_frame;
17 std::vector<std::string> child_frame;
21 pnh_.
getParam(
"parent_frame", param_val);
23 for(
int i = 0; i < param_val.
size(); i++) {
24 std::string st = param_val[i];
25 parent_frame.push_back(st);
28 std::string st = param_val;
29 parent_frame.push_back(st);
34 pnh_.
getParam(
"child_frame", param_val);
36 for(
int i = 0; i < param_val.
size(); i++) {
37 std::string st = param_val[i];
38 child_frame.push_back(st);
41 std::string st = param_val;
42 child_frame.push_back(st);
46 if (parent_frame.size() != child_frame.size()) {
47 ROS_FATAL(
"size difference between parent frames and child frames");
51 pnh_.
param(
"loop_hz", loop_hz, 1.0 );
53 for(
int i = 0; i < parent_frame.size(); i++) {
54 ROS_INFO_STREAM(
"parent->child: " << parent_frame[i] <<
" -> " << child_frame[i]);
63 for(
int i = 0; i < parent_frame.size(); i++) {
64 geometry_msgs::TransformStamped tfs_msg;
69 tf_msg.transforms.push_back(tfs_msg);
71 ROS_INFO_STREAM(
"missing transform: " << parent_frame[i] <<
" to " << child_frame[i]);
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Type const & getType() const
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
static void transformStampedTFToMsg(const StampedTransform &bt, geometry_msgs::TransformStamped &msg)
ROSCPP_DECL void spinOnce()