roslibjs icon indicating copy to clipboard operation
roslibjs copied to clipboard

Service response issue ..

Open vusdo opened this issue 6 years ago • 1 comments

If` you request service from the console, it will not respond or will respond immediately.

I want tts.py to quit and respond.

rosservice call /echo_service "msgs: 'hello.' type: 'type1'" msgs: '' type: ''

` //////////////////////// var echoServer = new ROSLIB.Service({ ros : ros, name : '/echo_service', serviceType : 'echo/echoService' }); echoServer.advertise(function(request, response) { console.log('service request : ' + echoServer.name + ': ' + request.msgs + ': ' + request.type);

// text to speech
var process = spawn('python3',["/home/nvidia/tts.py", request.msgs]);

process.stdout.on('data', function (data){
	response['msgs'] = request.msgs;
	response['type'] = request.type;
	return true;
});

}); //////////////////////////// `

vusdo avatar Oct 02 '18 05:10 vusdo

Service calls work, I recommend asking on https://answers.ros.org

mvollrath avatar Jan 19 '19 04:01 mvollrath