ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hello,
Try this code snippet, I think it will work on your case,
var customSrvClient = new ROSLIB.Service({
ros : ros,
name : '/pick_place',
serviceType : 'my_interface/PickPlace'
});
var request = new ROSLIB.ServiceRequest({
pick : {
x : 0.1,
y : 0.2,
z : 0.3
},
place : {
x : -0.1,
y : -0.2,
z : -0.3
},
speed: 200,
arm: 1
});
customSrvClient.callService(request, function(result) {
console.log('Your LOG -> Action performed');
});
2 | No.2 Revision |
Hello,
Try this code snippet, I think it will work on your case,
var customSrvClient = new ROSLIB.Service({
ros : ros,
name : '/pick_place',
serviceType : 'my_interface/PickPlace'
});
var request = new ROSLIB.ServiceRequest({
pick : {
x : 0.1,
y : 0.2,
z : 0.3
},
place : {
x : -0.1,
y : -0.2,
z : -0.3
},
speed: 200,
{ data: 200 },
arm: 1
{ data: 1 }
});
customSrvClient.callService(request, function(result) {
console.log('Your LOG -> Action performed');
});
3 | No.3 Revision |
Hello,
Try this code snippet, I think it will work on your case,
var customSrvClient = new ROSLIB.Service({
ros : ros,
name : '/pick_place',
serviceType : 'my_interface/PickPlace'
});
var request = new ROSLIB.ServiceRequest({
pick : {
x : 0.1,
y : 0.2,
z : 0.3
},
place : {
x : -0.1,
y : -0.2,
z : -0.3
},
speed: { data: 200 },
arm: { data: 1 'false' }
});
customSrvClient.callService(request, function(result) {
console.log('Your LOG -> Action performed');
});