RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
659 stars 372 forks source link

Visualisation of PointCloud2/TF2 in browser with ROS2 #694

Closed davidDS96 closed 3 months ago

davidDS96 commented 3 months ago

Hello all,

We were testing if we could visualise a PointCloud2 message in the browser using roslibjs in ROS2. We have verified that the PointCloud message arrives properly. However, while the 3D canvas is displayed, no PointCloud is visible. Looking at the errors, we suspect that the problem comes from the tf2_web_republisher package:

[rosbridge_websocket-1] [INFO] [1710498853.867756324] [rikkert.rosbridge_websocket]: Client connected. 1 clients total.
[rosbridge_websocket-1] [ERROR] [1710498853.879284256] [rikkert.rosbridge_websocket]: [Client 91d04f66-b86c-4754-8333-0fc7748421c6] [id: advertise:/tf2_web_republisher/goal:1] advertise: Unable to import msg class TFSubscriptionActionGoal from package tf2_web_republisher. Caused by module 'tf2_web_republisher.msg' has no attribute 'TFSubscriptionActionGoal'
[rosbridge_websocket-1] [ERROR] [1710498853.880151856] [rikkert.rosbridge_websocket]: [Client 91d04f66-b86c-4754-8333-0fc7748421c6] [id: subscribe:/tf2_web_republisher/feedback:3] subscribe: Unable to import msg class TFSubscriptionActionFeedback from package tf2_web_republisher. Caused by module 'tf2_web_republisher.msg' has no attribute 'TFSubscriptionActionFeedback'
[rosbridge_websocket-1] [INFO] [1710498853.881981997] [rikkert.rosbridge_websocket]: [Client 91d04f66-b86c-4754-8333-0fc7748421c6] Subscribed to /rs_bpearl/pointcloud
[rosbridge_websocket-1] [ERROR] [1710498854.026874867] [rikkert.rosbridge_websocket]: [Client 91d04f66-b86c-4754-8333-0fc7748421c6] [id: publish:/tf2_web_republisher/goal:5] publish: Cannot infer topic type for topic /tf2_web_republisher/goal as it is not yet advertised

Do you have any suggestions on how to fix this problem?

MatthijsBurgh commented 3 months ago

@davidDS96 as I said in https://github.com/RobotWebTools/ros3djs/issues/658#issuecomment-1999487958, tf2_web_republisher is not ROS2 compatible (yet). Why do you need to ask it again over here?