Skip to content
Matthew Donoughe edited this page Jun 9, 2011 · 1 revision

rosbridge exposes a number of services that are only visible to ros.js. These services are used for things that you would normally use rospy for, but are handled asynchronously as services in ros.js.

See Calling a Service for information on calling these services.

/rosjs/topics

Arguments: none.

Returns a list of topics in roscore.

/rosjs/services

Arguments: none.

Returns a list of services in roscore.

/rosjs/subscribe

Arguments: topic name, minimum delay

Subscribes to a topic. See Topics.

Returns 'OK' on success.

/rosjs/log

Arguments: file name, message

Writes a message to a file. Does not use ROS logging facilities! The file name is stripped of non-alphanumeric characters.

Returns 'OK' on success.

/rosjs/authorize

Arguments: key

Attempts to authenticate with rosbridge. An external webservice is used to check the key. See Authentication.

Returns 'OK' on success.

/rosjs/typeStringFromTopic

Arguments: topic

Returns the type string of an already published topic.

/rosjs/typeStringFromService

Arguments: service

Returns the type string of an already published service.

/rosjs/msgClassFromTypeString

Arguments: topic type string

Returns a template object matching the type string.

/rosjs/reqClassFromTypeString

Arguments: service type string

Returns a template object matching the request for the type string.

/rosjs/rspClassFromTypeString

Arguments: service type string

Returns a template object matching the response for the type string.

/rosjs/classFromTopic

Arguments: topic

Returns a template object matching the topic.

/rosjs/classesFromService

Arguments: service

Returns a the template objects for both the request and the response of the service, in fields req and rsp respectively.