Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Command line options #16

Closed
samiamlabs opened this issue Feb 16, 2019 · 3 comments
Closed

Command line options #16

samiamlabs opened this issue Feb 16, 2019 · 3 comments
Assignees
Labels
bug Something isn't working ready Work is about to start (Kanban column)

Comments

@samiamlabs
Copy link

Hi,

I'm getting a symbol lookup error when trying to run the robot_state_publisher node on the nightly build.

[INFO] [launch]: process[robot_state_publisher-1]: started with pid [1868]
/opt/ros/crystal/lib/robot_state_publisher/robot_state_publisher: symbol lookup error: /opt/ros/crystal/lib/robot_state_publisher/robot_state_publisher: undefined symbol: _ZN6rclcpp4NodeC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11NodeOptionsE

I suspect that this relates to ros2/rclcpp#492 and the recent merge that adds support for NodeOptions.
Got it working on my fork by using rcutils_cli_get_option instaid of reading argv[1] directly.
This change requires the command line options to be -f filename instead of just filename, so will cause existing launch files to stop working.
(https://github.com/DynoRobotics/robot_state_publisher/tree/command-line-options)

@samiamlabs samiamlabs changed the title Command line options on nightly build Command line options Feb 16, 2019
@samiamlabs
Copy link
Author

samiamlabs commented Feb 16, 2019

It seems my issue had to do with the sourcing of multiple workspaces in the Dockerfile I was using, not the command line option parsing.

I do think it is a good idea to use rcutils_cli_get_option for command line arguments but perhaps not worth breaking existing launch files?

@clalancette
Copy link

No, you are correct, we should properly handle command-line arguments by calling https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/utilities.hpp#L110, then looking for the argument in the "rest" of the list.

If you'd like to submit a PR to add this functionality, that would be great. Otherwise, I'm going to do some refactoring of robot_state_publisher in the not-too-distant future, so I'll do it then.

@mjcarroll mjcarroll added the ready Work is about to start (Kanban column) label Feb 28, 2019
@mjcarroll mjcarroll added the bug Something isn't working label Feb 28, 2019
@clalancette
Copy link

Superseded by ros#118, so closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ready Work is about to start (Kanban column)
Projects
None yet
Development

No branches or pull requests

3 participants