Nodes & Services
listNodes()
Get list of all ROS nodes in the system.
Returns: Promise<Array<string>> - Array of node names
JS
// Get all available nodes
const nodes = await oloClient.core.listNodes();
console.log(`Found ${nodes.length} nodes:`);
nodes.forEach(node => console.log(node));
// Filter for specific node types
const navNodes = nodes.filter(n =>
n.includes('nav') || n.includes('planner') || n.includes('controller')
);
console.log('Navigation nodes:', navNodes);
// Check if a specific node exists
if (nodes.includes('/robot_state_publisher')) {
console.log('Robot state publisher is running');
}listServices()
Get list of available ROS services.
Returns: Promise<Array<string>> - Array of service names
JS
// Get all available services
const services = await oloClient.core.listServices();
console.log(`Found ${services.length} services:`);
services.forEach(svc => console.log(svc));
// Filter for navigation services
const navServices = services.filter(s =>
s.includes('navigate') || s.includes('waypoint')
);callService(serviceName, serviceType, request)
Call a ROS service.
Parameters:
serviceName(string) - Service nameserviceType(string) - Service typerequest(object) - Service request data
Returns: Promise<Object> - Service response
JS
const response = await oloClient.core.callService('/get_map', 'nav_msgs/GetMap', {});
console.log('Map data:', response);