-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rosserial_python : Service handler returned None #408
Comments
Try version 7.7.0. The older version does not have this problem. /*
* rosserial Service Server
*/
#include <ros_m.h>
#include <std_msgs/String.h>
#include <rosserial_arduino/Test.h>
ros::NodeHandle nh;
using rosserial_arduino::Test;
int i;
void callback(const Test::Request & req, Test::Response & res){
if((i++)%2)
res.output = "hello";
else
res.output = "world";
}
ros::ServiceServer<Test::Request, Test::Response> server("test_srv",&callback);
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
nh.initNode();
nh.advertiseService(server);
nh.advertise(chatter);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
delay(10);
} $rosservice call /test_srv "input: 'sssss'"
ERROR: service [/test_srv] responded with an error: service cannot process request: service handler returned None |
Rosserial 0.8.0 appears to have problems with services (see ros-drivers/rosserial#408), so configuration is currently implemented as a subscriber rather than as a service.
Same issue with arduino Uno, Ros Melodic and last version of the binary package. |
Hi all, Did some tests with my Arduino Mega 2560 and Melodic... 0.7.7 works fine while 0.8.0 returns After trying different versions in between 0.7.7-0.8.0 I can tell that this issue was introduced in fe1e233. |
I got the same issue with an Arduino Micro: 0.7.7 is working, 0.8.0 responds with the error. |
* Added hard_reset service call to serial_node * Refactored SerialClient to use a write thread, working around deadlock when both Arduino and serial_node.py get stuck writing to each other. * Updated cmakelists and package.xml to include dependencies. Removed unnecessary tcp functionality from arduino-specific serial_node.py
@chrisspen and @mikepurvis |
I proposed a fix in #414. |
I've setup service server on stm32 :
But when I try to call the service from rosserial_python error occurs :
I tried to debug this error on stm32. Apparently, the error occurs befor computing srv_callback(). I assume that this is related with rosserial_python package but it's onyl guessing.
The text was updated successfully, but these errors were encountered: