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

PythonAPI sensor actor cleanup "no stream available" #1821

Open
fpasch opened this issue Jul 1, 2019 · 7 comments
Open

PythonAPI sensor actor cleanup "no stream available" #1821

fpasch opened this issue Jul 1, 2019 · 7 comments
Assignees
Labels
backlog c++ Requires changing C++ code feature request
Milestone

Comments

@fpasch
Copy link

fpasch commented Jul 1, 2019

There seems to be an issue within the cleanup of the sensor actors, which results in the following error messages:

ERROR: Invalid session: no stream available with id <...>
...

This was seen within the CARLA ROS bridge. It seems to happen whenever a sensor, that has a registered callback (self.carla_actor.listen(self._callback_sensor_data)) goes away.

To my knowledge there is no API available to handle that issue from within Python. (e.g. a callback whenever the actor goes away).

So I believe that we need to handle it within the CARLA PythonAPI code.

@nsubiron nsubiron added backlog c++ Requires changing C++ code feature request labels Jul 1, 2019
@nsubiron
Copy link
Collaborator

nsubiron commented Jul 1, 2019

It could be very handy having this callback, I think we can add a list of destroyed actors in the world observer's message, that'd make very easy adding callbacks in the client-side. This would be also very handy for the pedestrian navigation.

Meanwhile a workaround could be checking periodically if the actor is still alive

if world.get_snapshot().find(actor_id) is None:
    # actor was destroyed.
@fpasch
Copy link
Author

fpasch commented Jul 1, 2019

At the moment there are two tick()-callbacks registered in CARLA ROS bridge:

  1. update list of actors (this is done once per seconds) (Code)
  2. update time and current state of actors (on every tick) (Code)

Therefore the error-message is only seen for max 1s.

So ideally, we would have two callbacks:

  1. whenever a new actor was spawned
  2. whenever an actor was deleted
@germanros1987
Copy link
Member

@fpasch Is this still a relevant issue?

@germanros1987 germanros1987 added this to the 0.9.11 milestone Jun 26, 2020
@fpasch
Copy link
Author

fpasch commented Jun 26, 2020

Yes.

@germanros1987
Copy link
Member

Would it be fine to just keep a list with the deleted actors and offer that information to the client?

@fpasch
Copy link
Author

fpasch commented Jun 29, 2020

This issue has two aspects:

  1. How to find deleted actors
  2. Error message from CARLA Client Library

For 1.), although it would be convenient to have a callback on actor-deletion, there is the workaround to compare the actor lists between ticks (see ros-bridge). So this has a low priority.
What should get investigated is 2.), the clean up of sensors with registered callback.

@germanros1987
Copy link
Member

Added to the task board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog c++ Requires changing C++ code feature request
4 participants