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

Creating new customized sensor causing 'Segment Fault' #194

Open
cfs4819 opened this issue May 14, 2024 · 0 comments
Open

Creating new customized sensor causing 'Segment Fault' #194

cfs4819 opened this issue May 14, 2024 · 0 comments

Comments

@cfs4819
Copy link
Contributor

cfs4819 commented May 14, 2024

Describe the bug

After loading carla_apollo_bridge, some camera sensors need to be spawned so I can recorder the simulation.

However, when I spawned the recording camera, and add my own listenning callback function, a Segment Fault was caused in both Carla-Client and Carla-Server.

In what area(s)?

  • /area runtime
  • /area operator
  • /area placement
  • /area docs
  • /area test-and-release

A fixing suggestion

I tried adding a check before sensor listenning command in carla_bridge/sensor/camera.py , line 220

class RgbCamera(Camera):

    """
    Camera implementation details for rgb camera
    """

    def __init__(self, uid, name, parent, relative_spawn_pose, node, carla_actor, synchronous_mode):
        """
          ...
        """
        super(RgbCamera, self).__init__(uid=uid,
                                        name=name,
                                        parent=parent,
                                        relative_spawn_pose=relative_spawn_pose,
                                        node=node,
                                        carla_actor=carla_actor,
                                        synchronous_mode=synchronous_mode)
        if name in ["front_6mm", "front_12mm"]:
            self.listen()

So the bridge won't grab the customized sensor.listen callaback function, which is the main cause of segment fault.

But this method relies on understading object.json manualy, the files defines sensors belong exclusively to carla_bridge, instead of automatically excluding sensors belonging to carla_bridge.

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

1 participant