compas_fab
compas_fab copied to clipboard
wrapper for getting the current robot configuration
There's no method for getting the current robot position. Just put here for reference.
For the moment use this:
from roslibpy import Topic
listener = Topic(client, '/joint_states','sensor_msgs/JointState')
def callback(message):
print("joint_states", message["position"])
listener.subscribe(callback)
There are 2 ways of checking the rostopics and their types:
- Use ROS commands: To get a list of available topics you can type in the following command
rostopic list. To get the type of the topic/joint_states, use the commandrostopic info /joint_states - Use RosClient:
client.get_topics(callback)will receive a dictionary with 2 keys: a list of'topics'and a list of'types'