Skip to content
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

Race condition in topo map visualisation when switching maps #274

Open
cdondrup opened this issue Nov 4, 2015 · 1 comment
Open

Race condition in topo map visualisation when switching maps #274

cdondrup opened this issue Nov 4, 2015 · 1 comment

Comments

@cdondrup
Copy link
Member

cdondrup commented Nov 4, 2015

When the map is switched using the new service, the visualisation breaks sometimes because it tries to look-up a node before it received the updated topo map.

Possible solution would be to remove the topomap callback and replace the member variable storing it with rospy.wait_for_message(...), that would make sure that you always have the up to date topo map but would also increase traffic. Maybe a cleaver exception handling where if the node is not found you try to update the map first and retry it, would be sufficient.

Here the error:

[ERROR] [WallTime: 1446638032.063907] bad callback: <bound method TopologicalVis.MapCallback of <topological_navigation.map_marker.TopologicalVis object at 0x7fb821b2a650>>
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 711, in _invoke_callback
    cb(msg)
  File "/home/cdondrup/ros_ws/src/strands_navigation/topological_navigation/src/topological_navigation/map_marker.py", line 136, in MapCallback
    self._update_everything()
  File "/home/cdondrup/ros_ws/src/strands_navigation/topological_navigation/src/topological_navigation/map_marker.py", line 48, in _update_everything
    marker = self.get_edge_marker(i, j, idn)
  File "/home/cdondrup/ros_ws/src/strands_navigation/topological_navigation/src/topological_navigation/map_marker.py", line 67, in get_edge_marker
    V2= tmap_utils.get_node(self.lnodes, edge.node).pose.position
AttributeError: 'NoneType' object has no attribute 'pose'

This is a non-critical error as it only breaks the visualisation.

@Jailander
Copy link
Member

Yes, I need it in a callback because I want the visualisation updated when an edge is deleted, however this piece of code should be completely rewritten to use the map manager services instead of that topological map class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants