ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2017-01-23 10:30:35 -0500 | received badge | ● Famous Question (source) |
2016-04-15 02:31:49 -0500 | received badge | ● Popular Question (source) |
2015-09-03 05:48:45 -0500 | received badge | ● Notable Question (source) |
2015-07-29 08:44:01 -0500 | received badge | ● Popular Question (source) |
2015-04-29 07:02:26 -0500 | commented question | Problem with callback function, dynamically change buffer have tried my_local_pos =lp_nh.subscribe("my_pos", 50,myposcallback,this->my_pos_buff); lp_nh.subscribe("my_pos", 50,myposcallback,this-); lp_nh.subscribe("my_pos", 50,myposcallback,my_pos_buff); already... |
2015-04-29 07:01:12 -0500 | commented question | Problem with callback function, dynamically change buffer /home/clementperrousset/catkin_ws/src/mavros/mavros/src/plugins/local_position.cpp:46:78: error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [7], int, <unresolved overloaded="" function="" type="">, geometry_ |
2015-04-29 06:46:52 -0500 | asked a question | Problem with callback function, dynamically change buffer Hi everyone ! Here is my code`/** * @brief LocalPosition plugin * @file local_position.cpp * @author Vladimir Ermakov vooon341@gmail.com * @author Glenn Gregory
#include <mavros mavros_plugin.h=""> #include <pluginlib class_list_macros.h=""> #include <tf transform_broadcaster.h=""> #include <geometry_msgs posestamped.h=""> namespace mavplugin { /** * @brief Local position plugin. * Publish local position to TF and PositionStamped, */ class LocalPositionPlugin : public MavRosPlugin { public: LocalPositionPlugin() : lp_nh("~local_position"), uas(nullptr), send_tf(false) { }; private: ros::NodeHandle lp_nh; UAS *uas; }; }; // namespace mavplugin PLUGINLIB_EXPORT_CLASS(mavplugin::LocalPositionPlugin, mavplugin::MavRosPlugin) ` I would listen a geometry_msg by myposcallback through lp_nh.subscribe in order to fill "my_pos_buff" and to ultimately send the data in local_position. for context i'm trying to shortcut the local_position data to send my own. I'm having problem when i use //my_local_pos =lp_nh.subscribe("my_pos", 50,myposcallback) , and i'm having problem if i want to use this.my_pos_buffer in callback or in lp_nh.subscribe. Any idea to help me ? Lots of thank in advance, I do not understand where I'm mistaken . have a good day |
2015-04-29 06:46:52 -0500 | asked a question | Dynamically Change buffer ?? Problem with Callback function Hi everyone ! Here is my code`/** * @brief LocalPosition plugin * @file local_position.cpp * @author Vladimir Ermakov vooon341@gmail.com * @author Glenn Gregory
#include <mavros mavros_plugin.h=""> #include <pluginlib class_list_macros.h=""> #include <tf transform_broadcaster.h=""> #include <geometry_msgs posestamped.h=""> namespace mavplugin { /** * @brief Local position plugin. * Publish local position to TF and PositionStamped, */ class LocalPositionPlugin : public MavRosPlugin { public: LocalPositionPlugin() : lp_nh("~local_position"), uas(nullptr), send_tf(false) { }; private: ros::NodeHandle lp_nh; UAS *uas; }; }; // namespace mavplugin PLUGINLIB_EXPORT_CLASS(mavplugin::LocalPositionPlugin, mavplugin::MavRosPlugin) ` I would listen a geometry_msg by myposcallback through lp_nh.subscribe in order to fill "my_pos_buff" and to ultimately send the data in local_position. for context i'm trying to shortcut the local_position data to send my own. I'm having problem when i use //my_local_pos =lp_nh.subscribe("my_pos", 50,myposcallback) , and i'm having problem if i want to use this.my_pos_buffer in callback or in lp_nh.subscribe. Any idea to help me ? Lots of thank in advance, I do not understand where I'm mistaken . have a good day |