ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
TFClient
works for me on melodic:
roslaunch rosbridge_server rosbridge_websocket.launch &
rosrun tf2_ros static_transform_publisher 1 0 0 0 0 0 1 link1_parent link1 &
rosrun tf2_web_republisher tf2_web_republisher &
python tf.py
With tf.py:
from __future__ import print_function
import roslibpy
import roslibpy.tf
client = roslibpy.Ros(host='localhost', port=9090)
tf_client = roslibpy.tf.TFClient(client, fixed_frame='link1_parent',
angular_threshold=0.0,
translation_threshold=0.0,
rate=1.0)
def start_listening():
tf_client.subscribe('link1', print)
client.on_ready(start_listening, run_in_thread=True)
client.run_forever()
The data gets printed every second..