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

Use ROS parameters in transform #21

Open
mateusz-lichota opened this issue Dec 6, 2021 · 1 comment
Open

Use ROS parameters in transform #21

mateusz-lichota opened this issue Dec 6, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mateusz-lichota
Copy link
Contributor

Description

It would be immensly helpful to be able to set the parameters of transform via a yaml parameter file. For example, in a launch file:

Node(
        package='topic_tools',
        executable='transform_node.py',
        name='transform',
        output='screen',
        parameters=[
            {'input': '/conemap'},
            {'output-topic': '/conemap_rviz'},
            {'output-type': 'visualization_msgs/MarkerArray'},
            {'expression': 'conemap_to_markerarray.convert(m)'},
            {'import': ['conemap_to_markerarray']}
        ])

This way one can make a pip-installable python package, and withou worrying about any ROS implementation details just run it as a very simple ros node. I have a working implementation of this feature in my fork, although I'm a newbie to ros and it's probably full of bugs etc

Completion Criteria

You can use both command line arguments and ros parameters to alter transform settings.

@mateusz-lichota mateusz-lichota added the enhancement New feature or request label Dec 6, 2021
@emersonknapp
Copy link
Contributor

emersonknapp commented Dec 8, 2021

Yes - relay accepts inputs this way, and work-in-progress throttle #20 does as well. You are right that this is useful, and the intended interface of the program.

I think the way to implement this is to have the argparse portion of transform add parameters to the NodeOptions for the created node. Then the node can read its Parameters for configuration, instead of being passed an argparse.Namespace.

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

No branches or pull requests

2 participants