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

Implement getNodeNames from rcl_get_node_names #554

Merged
merged 1 commit into from
Jan 26, 2020
Merged

Implement getNodeNames from rcl_get_node_names #554

merged 1 commit into from
Jan 26, 2020

Conversation

mattrichard
Copy link
Collaborator

@mattrichard mattrichard commented Jan 25, 2020

Exposes the rcl rcl_get_node_names function as part of the rclnodejs Node class. Unlike the rclpy lib which returns an array of tuples, getNodeNames will return an array of objects following the pattern used in the other getXNamesAndTypes functions.

Here's some example output.

[
  { name: '_ros2cli_daemon_0', namespace: '/' },
  { name: 'launch_ros_4923', namespace: '/' },
  { name: 'robot_state_publisher', namespace: '/' },
  { name: 'gazebo', namespace: '/' },
  { name: 'turtlebot3_imu', namespace: '/' },
  { name: 'turtlebot3_laserscan', namespace: '/' },
  { name: 'camera_driver', namespace: '/' },
  { name: 'turtlebot3_diff_drive', namespace: '/' },
  { name: 'turtlebot3_joint_state', namespace: '/' }
]

Fix #555

@minggangw
Copy link
Member

Thanks for submitting this PR, I checked the error output on circleCI

Error: dlopen(/Users/distiller/RobotWebTools/rclnodejs/build/Release/rclnodejs.node, 1): Library not loaded: /usr/local/opt/poco/lib/libPocoFoundation.63.dylib

The reason is that the ROS2 binary is built with a different version of poco, which happened before. So, it's not your code causing this. Thanks for writing a unit test too and the PR looks good to me, I am going to merge it soon after some further checking.

P.S. there is an issue (#498) used to track the absent features, I think I missed this out.

@minggangw minggangw self-requested a review January 26, 2020 13:49
Copy link
Member

@minggangw minggangw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting it, LGTM.

@minggangw minggangw merged commit d4579b2 into RobotWebTools:develop Jan 26, 2020
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

Successfully merging this pull request may close these issues.

Feature request: expose rcl_get_node_names
2 participants