-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rviz2 tf message drop #133
Comments
Have you compared the performance to OpenSplice? ( Are you using BEST_EFFORT or RELIABLE QoS settings for the tf in rviz2? Since you are building from source, you might have to rebuild to use OpenSplice, following instructions at https://github.com/ros2/ros2/wiki/Linux-Development-Setup#install-more-dds-implementations-optional |
I use the default Qos settings in rviz2 |
I can reproduce what looks like a lag in tf frames sent from ros1 to ros 2 when using latest ros2 sources on xenial. I built both ros1_bridge and ros2 using Here's a smaller example that doesn't require rotors or gazebo. Save this file as pub_tf_transforms.py#!/usr/bin/env python
import math
import rospy
import tf_conversions
import tf2_ros
import geometry_msgs.msg
def circle_transform(child_frame, radius, angle):
t = geometry_msgs.msg.TransformStamped()
t.header.stamp = rospy.Time.now()
t.header.frame_id = "map"
t.child_frame_id = child_frame
t.transform.translation.x = radius * math.sin(angle)
t.transform.translation.y = radius * math.cos(angle)
t.transform.translation.z = 0.0
q = tf_conversions.transformations.quaternion_from_euler(0, 0, angle)
t.transform.rotation.x = q[0]
t.transform.rotation.y = q[1]
t.transform.rotation.z = q[2]
t.transform.rotation.w = q[3]
return t
if __name__ == '__main__':
rospy.init_node('pub_tf_transforms')
br = tf2_ros.TransformBroadcaster()
freq = 100.0
r = rospy.Rate(freq)
angle = 0.0
while not rospy.is_shutdown():
radius = 2.0 * math.sin(2.0 * angle)
t = circle_transform("base_link", radius, angle)
br.sendTransform(t)
angle += 2.0 * math.pi / freq / 5.0
if angle >= 2.0 * math.pi:
angle -= 2.0 * math.pi
r.sleep() Open a bunch of terminalsRoscore
RViz 1
Add TF display, and check RViz 2
Add TF display and check ROS 1 Bridge
TF publisher
It looks like what RViz2 and RViz display is out of sync. Visually it looks like RViz2 is displaying data about 1 second after RViz is. However, the movement of the link frame in both looks smooth to me. I have a lot of stuff running on the machine but the CPU and RAM usage isn't all that high.
|
This looks like it is an issue higher level than the bridge, possible tf2 or RViz2. When I run
|
@llllIIIIllll I believe the issue is resolved by the referenced PRs. Would you mind checking using your setup with the latest code? |
I have tried in my project, it works. Thank you! |
I'm having the same problem... but not only in Rviz. There is an open question on ROS answer if someone can help me: Thank you |
Bug report
Required Info:
Steps to reproduce issue
Step 1:
terimal 1:
setup ros1 environment(kinetic) and run
terminal 2:
build rotors_simulator with ros1
run the
mav_with_joy.launch
it will start gazebo, push the start button at gazebo
Step 2:
terminal 3
make the drone flying
Step 3:
terminal 4:
run the ros1_bridge
terminal 5:
start rviz and rviz2
add the tf in rviz2
terminal 6:
add the tf in rviz
Expected behavior
the tf frame should be same smooth between rviz and rviz2
Actual behavior
rviz2 is obvious lag and these are some tf messages lost
Additional information
If whe add up the
Frame rate
in rviz2 the display will more smooththe
ros2 run tf2_ros tf2_monitor
information is
mem (7.7 GiB)
cpu (Intel® Core™ i7-8550U CPU @ 1.80GHz × 8 ) information
Feature request
Feature description
Implementation considerations
The text was updated successfully, but these errors were encountered: