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

Connection with tf2_web_republisher [ROS2] #552

Closed
AndrewJSchoen opened this issue Jan 27, 2021 · 2 comments
Closed

Connection with tf2_web_republisher [ROS2] #552

AndrewJSchoen opened this issue Jan 27, 2021 · 2 comments
Labels

Comments

@AndrewJSchoen
Copy link

AndrewJSchoen commented Jan 27, 2021

A bit of an explanation first. I was trying to get a web-based application working with a ROS2-based backend (including 3d viewer), but ran into issues with the robot meshes showing up. I tested both rosbridge_suite (ros2 branch) and ros2-web-bridge, but eventually realized it had to do with a lack of compliant tf2_web_republisher. Since a ROS2-based tf2_web_republisher didn't exist, I actually created a python-based port for ROS2 here: tf2_web_republisher_py. However, it doesn't seem like it is fully working with both options of ROS bridging.

Expected Behavior

When running robot_state_publisher, my own tf2_web_republisher_py, and either of the two bridge libraries, the robot models should show up. Note, it does seem like the client successfully accesses those files.

Actual Behavior

No robot shows up.

For the ros2-web-bridge, it seems like the bridge doesn't connect to the services/actions provided by tf2_web_republisher_py:

ros2 node info /ros2_web_bridge      
/ros2_web_bridge
  Subscribers:
    /my_app_backend/server_updates: std_msgs/msg/String
    /visualization_marker: visualization_msgs/msg/Marker
  Publishers:
    /my_app_backend/gui_updates: std_msgs/msg/String
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
    /tf2_web_republisher/cancel: actionlib_msgs/msg/GoalID
  Service Servers:
    /ros2_web_bridge/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /ros2_web_bridge/get_parameters: rcl_interfaces/srv/GetParameters
    /ros2_web_bridge/list_parameters: rcl_interfaces/srv/ListParameters
    /ros2_web_bridge/set_parameters: rcl_interfaces/srv/SetParameters
    /ros2_web_bridge/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

In contrast, using the rosbridge_server, it doesn't seem to hav the cancel publisher:

ros2 node info /rosbridge_websocket 
/rosbridge_websocket
  Subscribers:

  Publishers:
    /client_count: std_msgs/msg/Int32
    /connected_clients: rosbridge_msgs/msg/ConnectedClients
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
  Service Servers:
    /rosbridge_websocket/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /rosbridge_websocket/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /rosbridge_websocket/get_parameters: rcl_interfaces/srv/GetParameters
    /rosbridge_websocket/list_parameters: rcl_interfaces/srv/ListParameters
    /rosbridge_websocket/set_parameters: rcl_interfaces/srv/SetParameters
    /rosbridge_websocket/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

When loading the robot on the frontend, I get the following errors in that console:

[ERROR] [1611770934.850646234] [rosbridge_websocket]: [Client 0] [id: advertise:/tf2_web_republisher/goal:55] advertise: Unable to import msg class TFSubscriptionActionGoal from package tf2_web_republisher. Caused by module 'tf2_web_republisher.msg' has no attribute 'TFSubscriptionActionGoal'
[ERROR] [1611770934.932197810] [rosbridge_websocket]: [Client 0] [id: subscribe:/tf2_web_republisher/feedback:57] subscribe: Unable to import msg class TFSubscriptionActionFeedback from package tf2_web_republisher. Caused by module 'tf2_web_republisher.msg' has no attribute 'TFSubscriptionActionFeedback'

** To me, this seems to look like ROS1 code? **

If it helps, here is the node info of the python-based tf2_web_republisher:

ros2 node info /tf2_web_republisher          
/tf2_web_republisher
  Subscribers:
    /tf: tf2_msgs/msg/TFMessage
    /tf_static: tf2_msgs/msg/TFMessage
  Publishers:
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
  Service Servers:
    /republish_tfs: tf2_web_republisher/srv/RepublishTFs
    /tf2_web_republisher/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /tf2_web_republisher/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /tf2_web_republisher/get_parameters: rcl_interfaces/srv/GetParameters
    /tf2_web_republisher/list_parameters: rcl_interfaces/srv/ListParameters
    /tf2_web_republisher/set_parameters: rcl_interfaces/srv/SetParameters
    /tf2_web_republisher/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:
    /tf2_web_republisher: tf2_web_republisher/action/TFSubscription
  Action Clients:

Steps to Reproduce the Problem

  1. Start robot_state_publisher, my own tf2_web_republisher_py, and either of the two bridge libraries
  2. Start a TFClient from roslibjs
  3. Load robot model in ros3djs

Specifications

  • ROS Version (echo $ROS_DISTRO): Foxy
  • OS Version (grep DISTRIB_CODENAME /etc/lsb-release): MacOS 11
  • Rosbridge Version (roscat rosbridge_server package.xml | grep '<version>'): 1.0.2
  • Twisted Version (python -c 'import twisted; print twisted.version'): 20.3.0

As an aside, I haven't fully vetted the tf2_web_republisher_py, but once it is working, I would be happy to transfer that over to you if you would like.

@github-actions
Copy link

This issue has been marked as stale because it has been open for 180 days with no activity. Please remove the stale label or add a comment to keep it open.

@DaAwesomeP
Copy link

I am experiencing this issue with irobot_create_msgs. It is not possible to run any actions.

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

No branches or pull requests

2 participants