ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version | answered 2016-11-08 02:34:10 -0500 Anonymous |
After adding return true;
to my bool callback, it works now. Whole example function (obviously my function is way bigger):
bool calcuCallback(beginner_tutorials::AddTwoInts::Request &req,
beginner_tutorials::AddTwoInts::Response &res)
{
res.sum = req.a + req.b;
return true; // this was needed
}
Any idea when the return true;
statement is needed and when it is not? When someone knows it, he can give the whole answer so I can mark it. Thanks Felix for setting me on track.
2 | No.2 Revision |
After adding return true;
to my bool callback, it works now. Whole example function (obviously my function is way bigger):
bool calcuCallback(beginner_tutorials::AddTwoInts::Request &req,
beginner_tutorials::AddTwoInts::Response &res)
{
res.sum = req.a + req.b;
return true; // this was needed
}
Any idea when the return true;
statement is needed and when it is not? not (or if it is just a workaround for another depper issue)? When someone knows it, he can give the whole answer so I can mark it. Thanks Felix for setting me on track.
3 | No.3 Revision |
After adding return true;
to my bool callback, it works now. Whole example function (obviously my function is way bigger):
bool calcuCallback(beginner_tutorials::AddTwoInts::Request &req,
beginner_tutorials::AddTwoInts::Response &res)
{
res.sum = req.a + req.b;
return true; // this was needed
}
Any idea when the return true;
statement is needed and when it is not (or if it is just a workaround for another depper deeper issue)? When someone knows it, he can give the whole answer so I can mark it. Thanks Felix for setting me on track.