Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ROS nodes] Inputs topics options for ROS #209

Closed
thomaspeyrucain opened this issue Feb 1, 2022 · 1 comment · Fixed by #364
Closed

[ROS nodes] Inputs topics options for ROS #209

thomaspeyrucain opened this issue Feb 1, 2022 · 1 comment · Fixed by #364

Comments

@thomaspeyrucain
Copy link
Contributor

In order for the toolkit to be more homogeneous we would need to choose between those two options:

  1. Use the input topics as an option to pass to the rosrun like : rosrun perception test.py input_topic:=/input. This option would require to create a roslaunch file where you would need to modify there the input topics.
    For example this package is using this method : https://github.com/opendr-eu/opendr/blob/tx2_install/projects/opendr_ws/src/perception/scripts/speech_command_recognition.py

  2. Use ROS parameters : Each function will take rosparams as topic input. This option will be to create a config.yaml file once with all the parameters that you would need to set up the ROS params.
    For example this package is using this method : https://github.com/opendr-eu/opendr/blob/tx2_install/projects/opendr_ws/src/perception/scripts/object_detection_2d_centernet.py
    is using rosparam

For now the ROS nodes in OpenDR are using both of those options.
The second option would be a bit better.

@tsampazk
Copy link
Collaborator

tsampazk commented Jul 5, 2022

Hey @thomaspeyrucain, can you please take a look at the new ROS2 Pose Estimation node?

It uses argparse as the node in the link you provided in 1. Through the arguments, the input image topic, the output image topic as well as the detection message topic can be modified, along with the device (cpu, cuda). Specific to the pose estimation node there is also the option of accelerate to make the node run faster but be less accurate.

This can serve as a template to follow in the other ROS1/2 nodes, using argparse and specific argument names and default values for the input and output topics, with minor modifications depending on the node, but keeping consistency across all of them.

@tsampazk tsampazk linked a pull request Nov 30, 2022 that will close this issue
@tsampazk tsampazk closed this as completed Dec 6, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants