ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2021-04-06 11:57:38 -0500 | received badge | ● Good Question (source) |
2016-10-27 04:23:07 -0500 | received badge | ● Famous Question (source) |
2016-08-02 15:08:22 -0500 | received badge | ● Teacher (source) |
2016-08-02 15:08:22 -0500 | received badge | ● Self-Learner (source) |
2016-08-02 15:04:47 -0500 | received badge | ● Notable Question (source) |
2016-08-02 15:04:47 -0500 | received badge | ● Popular Question (source) |
2016-07-13 07:42:32 -0500 | answered a question | Providing arguments to subscriber callback function Changing to
solved the problem.I think the problem was that boost::bind provides references as shared pointers, which cannot be assigned to regular references. Used roehling's answer to this question: http://answers.ros.org/question/12183... |
2016-07-13 07:25:57 -0500 | asked a question | Providing arguments to subscriber callback function Hello, I am trying to register same callback for different topics.What I am trying to do is distinguishing the message origin. I am trying to provide argument to callback function to achieve this.I am using boost::bind. Here is the signature of my callback function:
Here is the code that I use to instantiate the subscriber:
This is the error that I got when I run "catkin_make" In file included from /usr/include/boost/bind.hpp:22:0, from /opt/ros/indigo/include/ros/publisher.h:35, from /opt/ros/indigo/include/ros/node_handle.h:32, from /opt/ros/indigo/include/ros/ros.h:45, from /home/baskin/KOVAN/src/uav/uav_src/uav_master.cpp:1: /usr/include/boost/bind/bind.hpp: In instantiation of ‘void boost::_bi::list2<a1, a2="">::operator()(boost::_bi::type<void>, F&, A&, int) [with F = void (*)(const uav::Done_<std::allocator<void> >&, std::basic_string<char>); A = boost::_bi::list1<const boost::shared_ptr<const="" uav::done_<std::allocator<void=""> > >&>; A1 = boost::arg<1>; A2 = boost::_bi::value<std::basic_string<char> >]’: /usr/include/boost/bind/bind_template.hpp:47:59: required from ‘boost::_bi::bind_t<r, f,="" l="">::result_type boost::_bi::bind_t<r, f,="" l="">::operator()(const A1&) [with A1 = boost::shared_ptr<const uav::done_<std::allocator<void=""> > >; R = void; F = void (*)(const uav::Done_<std::allocator<void> >&, std::basic_string<char>); L = boost::_bi::list2<boost::arg<1>, boost::_bi::value<std::basic_string<char> > >; boost::_bi::bind_t<r, f,="" l="">::result_type = void]’ /usr/include/boost/function/function_template.hpp:153:11: required from ‘static void boost::detail::function::void_function_obj_invoker1<functionobj, r,="" t0="">::invoke(boost::detail::function::function_buffer&, T0) [with FunctionObj = boost::_bi::bind_t<void, void="" (*)(const="" uav::done_<std::allocator<void=""> >&, std::basic_string<char>), boost::_bi::list2<boost::arg<1>, boost::_bi::value<std::basic_string<char> > > >; R = void; T0 = const boost::shared_ptr<const uav::done_<std::allocator<void=""> > >&]’ /usr/include/boost/function/function_template.hpp:934:38: required from ‘void boost::function1<r, t1="">::assign_to(Functor) [with Functor = boost::_bi::bind_t<void, void="" (*)(const="" uav::done_<std::allocator<void=""> >&, std::basic_string<char>), boost::_bi::list2<boost::arg<1>, boost::_bi::value<std::basic_string<char> > > >; R = void; T0 = const boost::shared_ptr<const uav::done_<std::allocator<void=""> > >&]’ /usr/include/boost/function/function_template.hpp:722:7: required from ‘boost::function1<r, t1="">::function1(Functor, typename boost::enable_if_c<boost::type_traits::ice_not<boost::is_integral<functor>::value>::value, int>::type) [with Functor = boost::_bi::bind_t<void, void="" (*)(const="" uav::done_<std::allocator<void=""> >&, std::basic_string<char>), boost::_bi::list2<boost::arg<1>, boost::_bi::value<std::basic_string<char> > > >; R = void; T0 = const boost::shared_ptr<const uav::done_<std::allocator<void=""> > >&; typename boost::enable_if_c<boost::type_traits::ice_not<boost::is_integral<functor>::value>::value, int>::type = int]’ /usr/include/boost/function/function_template.hpp:1069:16: required from ‘boost::function<r(t0)>::function(Functor, typename boost::enable_if_c ...(more) |
2016-05-19 00:36:41 -0500 | received badge | ● Famous Question (source) |
2016-05-09 16:16:55 -0500 | received badge | ● Famous Question (source) |
2016-04-27 11:14:43 -0500 | received badge | ● Notable Question (source) |
2016-04-20 01:39:05 -0500 | received badge | ● Popular Question (source) |
2016-04-19 10:09:14 -0500 | asked a question | ROS Multiple Subscriber Callback Inconsistency Hello, I am trying to control 8 hector quadrotors in gazebo using one node as command-giver.There are 8 subscribers for position topics of quadrotors.Depending on the positions, I give velocities.But there is a problem.In one run every quadrotor respond, in another one just 2 respond and in another just 1 responds.I think there is an issue with callback mechanism. Did anyone encounter an issue like this? I am running the code in Ubuntu installed on a virtual machine. |
2016-04-14 14:17:42 -0500 | received badge | ● Nice Question (source) |
2016-04-13 14:53:19 -0500 | received badge | ● Notable Question (source) |
2016-04-13 10:10:45 -0500 | received badge | ● Supporter (source) |
2016-04-13 10:10:42 -0500 | received badge | ● Scholar (source) |
2016-04-13 08:56:56 -0500 | received badge | ● Popular Question (source) |
2016-04-13 07:43:11 -0500 | received badge | ● Student (source) |
2016-04-13 07:41:48 -0500 | asked a question | Setting up ros on real hardware Hello, I began to work on ROS.On my home computer everything is okay.I can send/receive messages over topics, I can exchange messages over services, use rosbags, parameters, create launch files.I am aware that nodes can make communications over network etc. What about porting these programmes to real robots? Is it neccessary to first setup an OS and setup ROS on robots and start nodes? What is the common practice? Do robots have systems to just respond to commands and transmit info to nodes which are on a different computer? or is there way to make the nodes actually run on robots without need to setup host OS? |