Skip to content

ROS_API Ref

Isaac edited this page Feb 1, 2019 · 1 revision

This is a page to act as a reference for the current state of the ROS_API and the functions supported. Further details can be found inside the comments of ros_api/main.py.


Class Description Implementation
Publisher A wrapper class to make data avaliable to other nodes/packages ros.Publisher(<topic>, <message>, queue_size=<queue_size>
Subscriber A wrapper class to listen to data sent from a publisher ros.Subscriber(<topic>, <message>, call=<function>)
Custom Functions Description Implementation
println Mimicks python3's print() for objects ros.println(<object>)
is_running Returns inverse of is_shutdown ros.is_running()
json_to_msg Converts a JSON string to a message ros.json_to_msg(<json_string>, <message>)
dict_to_msg Converts a python dictionary to a message ros.dict_to_msg(<dictionary>, <message>)
msg_to_dict Converts a message object to a dictionary ros.msg_to_dict(<message>)
msg_to_json Converts a message object to a JSON string ros.msg_to_json(<message>)
Default Functions Description Implementation
init_node Should be called only once, with a unique name See wiki, See rospy ros.sleep()
is_shutdown See rospy ros.is_shutdown()
sleep See rospy ros.sleep()
spin See rospy ros.spin()
loginfo See rospy ros.loginfo()