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

Can't generate message CameraInfo #155

Open
ebhrz opened this issue Oct 26, 2023 · 0 comments
Open

Can't generate message CameraInfo #155

ebhrz opened this issue Oct 26, 2023 · 0 comments

Comments

@ebhrz
Copy link

ebhrz commented Oct 26, 2023

The message type CameraInfo depends on the sensor_msgs, however, in the function in dynamic.py

def _gen_dyn_modify_references(py_text, current_type, types):
...
        for t in types:
                pkg, base_type = genmsg.package_resource_name(t)
                gen_name = _gen_dyn_name(pkg, base_type)
                # - remove any import statements
                py_text = py_text.replace('import %s.msg' % pkg, '')
...

This line will erase the statement of importing sensor_msgs.msg, because the variable pkg here is sensor_msg. Then the message fails to generate.
Does this aim to avoid importing some message type repeatedly?

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