v-kiniv / rws

WebSocket gateway for ROS2 topics and services
Apache License 2.0
8 stars 4 forks source link

Compilation fails on Humble #7

Closed MoffKalast closed 8 months ago

MoffKalast commented 8 months ago

Hey, I just wanted to try this out since it seems like a good stopgap replacement for rosbridge, especially given how monumental moving to Foxglove's protocol would be. Unfortunately it seems to be missing some middleware dependencies on Humble? I'm not entirely sure.

I see the repo's been somewhat stale since last year, but in case there's still any maintenance planned I'd be glad to test out any fixes or ideas that may get us closer to one.

Starting >>> rws
--- stderr: rws
CMake Deprecation Warning at /home/ubuntu/colcon_ws/build/rws/_deps/websocketpp-src/CMakeLists.txt:5 (cmake_mini                                                    mum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

** websocketpp

=========== Used Build Configuration =============

In file included from /home/ubuntu/colcon_ws/src/rws/include/rws/client_handler.hpp:21,
                 from /home/ubuntu/colcon_ws/src/rws/src/client_handler.cpp:15:
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp: In constructor ‘rws::topic_params::topic_params()’:
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:40:15: warning: ‘rws::topic_params::type’ will be initi                                                    alized after [-Wreorder]
   40 |   std::string type;
      |               ^~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:36:8: warning:   ‘bool rws::topic_params::latch’ [-Wreo                                                    rder]
   36 |   bool latch;  // only for publishers, rws internal
      |        ^~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:18:3: warning:   when initialized here [-Wreorder]
   18 |   topic_params() : history_depth(10), compression("none"), topic(""), type(""), latch(false) {}
      |   ^~~~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp: In constructor ‘rws::topic_params::topic_params(std::s                                                    tring, std::string)’:
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:40:15: warning: ‘rws::topic_params::type’ will be initi                                                    alized after [-Wreorder]
   40 |   std::string type;
      |               ^~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:36:8: warning:   ‘bool rws::topic_params::latch’ [-Wreo                                                    rder]
   36 |   bool latch;  // only for publishers, rws internal
      |        ^~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:19:3: warning:   when initialized here [-Wreorder]
   19 |   topic_params(std::string t, std::string tp)
      |   ^~~~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp: In constructor ‘rws::topic_params::topic_params(std::s                                                    tring, std::string, size_t, std::string)’:
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:40:15: warning: ‘rws::topic_params::type’ will be initi                                                    alized after [-Wreorder]
   40 |   std::string type;
      |               ^~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:36:8: warning:   ‘bool rws::topic_params::latch’ [-Wreo                                                    rder]
   36 |   bool latch;  // only for publishers, rws internal
      |        ^~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:23:3: warning:   when initialized here [-Wreorder]
   23 |   topic_params(std::string t, std::string tp, size_t qs, std::string c)
      |   ^~~~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp: In constructor ‘rws::topic_params::topic_params(std::s                                                    tring, std::string, size_t, bool)’:
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:40:15: warning: ‘rws::topic_params::type’ will be initi                                                    alized after [-Wreorder]
   40 |   std::string type;
      |               ^~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:36:8: warning:   ‘bool rws::topic_params::latch’ [-Wreo                                                    rder]
   36 |   bool latch;  // only for publishers, rws internal
      |        ^~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:27:3: warning:   when initialized here [-Wreorder]
   27 |   topic_params(std::string t, std::string tp, size_t qs, bool l)
      |   ^~~~~~~~~~~~
In file included from /home/ubuntu/colcon_ws/src/rws/src/client_handler.cpp:15:
/home/ubuntu/colcon_ws/src/rws/include/rws/client_handler.hpp: In constructor ‘rws::ClientHandler::ClientHandler                                                    (int, std::shared_ptr<rws::NodeInterface<> >, std::shared_ptr<rws::Connector<> >, bool, std::function<void(std::                                                    __cxx11::basic_string<char>&)>, std::function<void(std::vector<unsigned char>&)>)’:
/home/ubuntu/colcon_ws/src/rws/include/rws/client_handler.hpp:46:37: warning: ‘rws::ClientHandler::connector_’ w                                                    ill be initialized after [-Wreorder]
   46 |   std::shared_ptr<rws::Connector<>> connector_;
      |                                     ^~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/include/rws/client_handler.hpp:42:8: warning:   ‘bool rws::ClientHandler::rosbrid                                                    ge_compatible_’ [-Wreorder]
   42 |   bool rosbridge_compatible_;
      |        ^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/src/client_handler.cpp:38:1: warning:   when initialized here [-Wreorder]
   38 | ClientHandler::ClientHandler(
      | ^~~~~~~~~~~~~
In file included from /home/ubuntu/colcon_ws/src/rws/include/rws/node_interface.hpp:6,
                 from /home/ubuntu/colcon_ws/src/rws/include/rws/connector.hpp:8,
                 from /home/ubuntu/colcon_ws/src/rws/include/rws/client_handler.hpp:21,
                 from /home/ubuntu/colcon_ws/src/rws/src/client_handler.cpp:15:
/home/ubuntu/colcon_ws/src/rws/include/rws/generic_client.hpp: In member function ‘rws::GenericClient::SharedFut                                                    ure rws::GenericClient::async_send_request(rws::GenericClient::SharedRequest, rws::GenericClient::CallbackType&&                                                    )’:
/home/ubuntu/colcon_ws/src/rws/include/rws/generic_client.hpp:145:20: warning: ignoring return value of ‘rmw_ret                                                    _t rmw_deserialize(const rmw_serialized_message_t*, const rosidl_message_type_support_t*, void*)’ declared with                                                     attribute ‘warn_unused_result’ [-Wunused-result]
  145 |     rmw_deserialize(sm, req_ts_hdl_, buf.get());
      |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/colcon_ws/src/rws/src/serdes.cpp:18:10: fatal error: dds/ddsrt/endian.h: No such file or directory
   18 | #include "dds/ddsrt/endian.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/rws_server.dir/build.make:90: CMakeFiles/rws_server.dir/src/serdes.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:231: CMakeFiles/rws_server.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< rws [3min 35s, exited with code 2]

Summary: 6 packages finished [5min 26s]
  1 package failed: rws
v-kiniv commented 8 months ago

What middleware are you using? Can you try to install cyclone and try to build rws again?

MoffKalast commented 8 months ago

I am actually already on cyclone right now, I could try it with fastdds in case it changes anything, though it's usually been unreliable for me without the discovery server.

Edit: Seems to have the same results on fastdds.

v-kiniv commented 8 months ago

It should work with both cyclone and fastdds, but since your build is failing on missing endian.h header and it's from cyclonedds package, I assumed you are using some third middleware. Are you building ROS2 from source or using binary packages. If you are building your workspace using binary packages, dds/ddsrt/endian.h is shipped with ros-humble-cyclonedds. You can check that by running dpkg --listfiles ros-humble-cyclonedds. I didn't try to build rws on humble, but it seems to me like the problem is not in the difference between galactic and humble, because rmw_cyclone_dds package in humble distro uses the same dependency, and it's not changed since galactic.

MoffKalast commented 8 months ago

Ah no it's a fairly typical ROS 2 binary install from apt on Ubuntu 22.04, though aarch64 on a Pi 4 if that in any way matters. Should be up to date in terms of package syncs as well.

dpkg --listfiles ros-humble-cyclonedds | grep endian
/opt/ros/humble/include/dds/ddsrt/endian.h
/opt/ros/humble/include/idl/endian.h

Well it seems like it's there at first glance. Really weird.

Here's the full dump in case there's anything else of note that's changed:

/.
/opt
/opt/ros
/opt/ros/humble
/opt/ros/humble/bin
/opt/ros/humble/bin/ddsperf
/opt/ros/humble/bin/idlc
/opt/ros/humble/include
/opt/ros/humble/include/dds
/opt/ros/humble/include/dds/config.h
/opt/ros/humble/include/dds/dds.h
/opt/ros/humble/include/dds/ddsc
/opt/ros/humble/include/dds/ddsc/dds_basic_types.h
/opt/ros/humble/include/dds/ddsc/dds_data_allocator.h
/opt/ros/humble/include/dds/ddsc/dds_internal_api.h
/opt/ros/humble/include/dds/ddsc/dds_loan_api.h
/opt/ros/humble/include/dds/ddsc/dds_opcodes.h
/opt/ros/humble/include/dds/ddsc/dds_public_alloc.h
/opt/ros/humble/include/dds/ddsc/dds_public_error.h
/opt/ros/humble/include/dds/ddsc/dds_public_impl.h
/opt/ros/humble/include/dds/ddsc/dds_public_listener.h
/opt/ros/humble/include/dds/ddsc/dds_public_qos.h
/opt/ros/humble/include/dds/ddsc/dds_public_qosdefs.h
/opt/ros/humble/include/dds/ddsc/dds_public_status.h
/opt/ros/humble/include/dds/ddsc/dds_rhc.h
/opt/ros/humble/include/dds/ddsc/dds_statistics.h
/opt/ros/humble/include/dds/ddsi
/opt/ros/humble/include/dds/ddsi/ddsi_acknack.h
/opt/ros/humble/include/dds/ddsi/ddsi_builtin_topic_if.h
/opt/ros/humble/include/dds/ddsi/ddsi_cdrstream.h
/opt/ros/humble/include/dds/ddsi/ddsi_cfgelems.h
/opt/ros/humble/include/dds/ddsi/ddsi_cfgunits.h
/opt/ros/humble/include/dds/ddsi/ddsi_config.h
/opt/ros/humble/include/dds/ddsi/ddsi_config_impl.h
/opt/ros/humble/include/dds/ddsi/ddsi_deadline.h
/opt/ros/humble/include/dds/ddsi/ddsi_deliver_locally.h
/opt/ros/humble/include/dds/ddsi/ddsi_domaingv.h
/opt/ros/humble/include/dds/ddsi/ddsi_endpoint.h
/opt/ros/humble/include/dds/ddsi/ddsi_entity.h
/opt/ros/humble/include/dds/ddsi/ddsi_entity_index.h
/opt/ros/humble/include/dds/ddsi/ddsi_entity_match.h
/opt/ros/humble/include/dds/ddsi/ddsi_guid.h
/opt/ros/humble/include/dds/ddsi/ddsi_handshake.h
/opt/ros/humble/include/dds/ddsi/ddsi_iid.h
/opt/ros/humble/include/dds/ddsi/ddsi_ipaddr.h
/opt/ros/humble/include/dds/ddsi/ddsi_keyhash.h
/opt/ros/humble/include/dds/ddsi/ddsi_lifespan.h
/opt/ros/humble/include/dds/ddsi/ddsi_list_genptr.h
/opt/ros/humble/include/dds/ddsi/ddsi_list_tmpl.h
/opt/ros/humble/include/dds/ddsi/ddsi_locator.h
/opt/ros/humble/include/dds/ddsi/ddsi_mcgroup.h
/opt/ros/humble/include/dds/ddsi/ddsi_ownip.h
/opt/ros/humble/include/dds/ddsi/ddsi_participant.h
/opt/ros/humble/include/dds/ddsi/ddsi_plist.h
/opt/ros/humble/include/dds/ddsi/ddsi_plist_generic.h
/opt/ros/humble/include/dds/ddsi/ddsi_pmd.h
/opt/ros/humble/include/dds/ddsi/ddsi_portmapping.h
/opt/ros/humble/include/dds/ddsi/ddsi_proxy_endpoint.h
/opt/ros/humble/include/dds/ddsi/ddsi_proxy_participant.h
/opt/ros/humble/include/dds/ddsi/ddsi_raweth.h
/opt/ros/humble/include/dds/ddsi/ddsi_rhc.h
/opt/ros/humble/include/dds/ddsi/ddsi_security_exchange.h
/opt/ros/humble/include/dds/ddsi/ddsi_security_msg.h
/opt/ros/humble/include/dds/ddsi/ddsi_security_omg.h
/opt/ros/humble/include/dds/ddsi/ddsi_security_util.h
/opt/ros/humble/include/dds/ddsi/ddsi_serdata.h
/opt/ros/humble/include/dds/ddsi/ddsi_serdata_default.h
/opt/ros/humble/include/dds/ddsi/ddsi_serdata_plist.h
/opt/ros/humble/include/dds/ddsi/ddsi_serdata_pserop.h
/opt/ros/humble/include/dds/ddsi/ddsi_sertopic.h
/opt/ros/humble/include/dds/ddsi/ddsi_sertype.h
/opt/ros/humble/include/dds/ddsi/ddsi_shm_transport.h
/opt/ros/humble/include/dds/ddsi/ddsi_ssl.h
/opt/ros/humble/include/dds/ddsi/ddsi_statistics.h
/opt/ros/humble/include/dds/ddsi/ddsi_tcp.h
/opt/ros/humble/include/dds/ddsi/ddsi_threadmon.h
/opt/ros/humble/include/dds/ddsi/ddsi_time.h
/opt/ros/humble/include/dds/ddsi/ddsi_tkmap.h
/opt/ros/humble/include/dds/ddsi/ddsi_topic.h
/opt/ros/humble/include/dds/ddsi/ddsi_tran.h
/opt/ros/humble/include/dds/ddsi/ddsi_typebuilder.h
/opt/ros/humble/include/dds/ddsi/ddsi_typelib.h
/opt/ros/humble/include/dds/ddsi/ddsi_typelookup.h
/opt/ros/humble/include/dds/ddsi/ddsi_typewrap.h
/opt/ros/humble/include/dds/ddsi/ddsi_udp.h
/opt/ros/humble/include/dds/ddsi/ddsi_vendor.h
/opt/ros/humble/include/dds/ddsi/ddsi_vnet.h
/opt/ros/humble/include/dds/ddsi/ddsi_wraddrset.h
/opt/ros/humble/include/dds/ddsi/ddsi_xqos.h
/opt/ros/humble/include/dds/ddsi/ddsi_xt_impl.h
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typeinfo.h
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typeinfo.idl
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typelookup.h
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typelookup.idl
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typemap.h
/opt/ros/humble/include/dds/ddsi/ddsi_xt_typemap.idl
/opt/ros/humble/include/dds/ddsi/q_addrset.h
/opt/ros/humble/include/dds/ddsi/q_bitset.h
/opt/ros/humble/include/dds/ddsi/q_bswap.h
/opt/ros/humble/include/dds/ddsi/q_ddsi_discovery.h
/opt/ros/humble/include/dds/ddsi/q_debmon.h
/opt/ros/humble/include/dds/ddsi/q_feature_check.h
/opt/ros/humble/include/dds/ddsi/q_freelist.h
/opt/ros/humble/include/dds/ddsi/q_gc.h
/opt/ros/humble/include/dds/ddsi/q_hbcontrol.h
/opt/ros/humble/include/dds/ddsi/q_init.h
/opt/ros/humble/include/dds/ddsi/q_inverse_uint32_set.h
/opt/ros/humble/include/dds/ddsi/q_lat_estim.h
/opt/ros/humble/include/dds/ddsi/q_lease.h
/opt/ros/humble/include/dds/ddsi/q_log.h
/opt/ros/humble/include/dds/ddsi/q_misc.h
/opt/ros/humble/include/dds/ddsi/q_pcap.h
/opt/ros/humble/include/dds/ddsi/q_protocol.h
/opt/ros/humble/include/dds/ddsi/q_qosmatch.h
/opt/ros/humble/include/dds/ddsi/q_radmin.h
/opt/ros/humble/include/dds/ddsi/q_receive.h
/opt/ros/humble/include/dds/ddsi/q_rtps.h
/opt/ros/humble/include/dds/ddsi/q_sockwaitset.h
/opt/ros/humble/include/dds/ddsi/q_thread.h
/opt/ros/humble/include/dds/ddsi/q_transmit.h
/opt/ros/humble/include/dds/ddsi/q_unused.h
/opt/ros/humble/include/dds/ddsi/q_whc.h
/opt/ros/humble/include/dds/ddsi/q_xevent.h
/opt/ros/humble/include/dds/ddsi/q_xmsg.h
/opt/ros/humble/include/dds/ddsi/sysdeps.h
/opt/ros/humble/include/dds/ddsrt
/opt/ros/humble/include/dds/ddsrt/align.h
/opt/ros/humble/include/dds/ddsrt/arch.h
/opt/ros/humble/include/dds/ddsrt/atomics
/opt/ros/humble/include/dds/ddsrt/atomics/arm.h
/opt/ros/humble/include/dds/ddsrt/atomics/gcc.h
/opt/ros/humble/include/dds/ddsrt/atomics/msvc.h
/opt/ros/humble/include/dds/ddsrt/atomics/sun.h
/opt/ros/humble/include/dds/ddsrt/atomics.h
/opt/ros/humble/include/dds/ddsrt/attributes.h
/opt/ros/humble/include/dds/ddsrt/avl.h
/opt/ros/humble/include/dds/ddsrt/bswap.h
/opt/ros/humble/include/dds/ddsrt/cdtors.h
/opt/ros/humble/include/dds/ddsrt/circlist.h
/opt/ros/humble/include/dds/ddsrt/countargs.h
/opt/ros/humble/include/dds/ddsrt/dynlib.h
/opt/ros/humble/include/dds/ddsrt/endian.h
/opt/ros/humble/include/dds/ddsrt/environ.h
/opt/ros/humble/include/dds/ddsrt/expand_vars.h
/opt/ros/humble/include/dds/ddsrt/fibheap.h
/opt/ros/humble/include/dds/ddsrt/filesystem
/opt/ros/humble/include/dds/ddsrt/filesystem/posix.h
/opt/ros/humble/include/dds/ddsrt/filesystem/windows.h
/opt/ros/humble/include/dds/ddsrt/filesystem.h
/opt/ros/humble/include/dds/ddsrt/heap.h
/opt/ros/humble/include/dds/ddsrt/hopscotch.h
/opt/ros/humble/include/dds/ddsrt/ifaddrs.h
/opt/ros/humble/include/dds/ddsrt/io.h
/opt/ros/humble/include/dds/ddsrt/iovec.h
/opt/ros/humble/include/dds/ddsrt/log.h
/opt/ros/humble/include/dds/ddsrt/md5.h
/opt/ros/humble/include/dds/ddsrt/mh3.h
/opt/ros/humble/include/dds/ddsrt/misc.h
/opt/ros/humble/include/dds/ddsrt/netstat.h
/opt/ros/humble/include/dds/ddsrt/process.h
/opt/ros/humble/include/dds/ddsrt/random.h
/opt/ros/humble/include/dds/ddsrt/retcode.h
/opt/ros/humble/include/dds/ddsrt/rusage.h
/opt/ros/humble/include/dds/ddsrt/sched.h
/opt/ros/humble/include/dds/ddsrt/sockets
/opt/ros/humble/include/dds/ddsrt/sockets/posix.h
/opt/ros/humble/include/dds/ddsrt/sockets/windows.h
/opt/ros/humble/include/dds/ddsrt/sockets.h
/opt/ros/humble/include/dds/ddsrt/static_assert.h
/opt/ros/humble/include/dds/ddsrt/string.h
/opt/ros/humble/include/dds/ddsrt/strtod.h
/opt/ros/humble/include/dds/ddsrt/strtol.h
/opt/ros/humble/include/dds/ddsrt/sync
/opt/ros/humble/include/dds/ddsrt/sync/freertos.h
/opt/ros/humble/include/dds/ddsrt/sync/posix.h
/opt/ros/humble/include/dds/ddsrt/sync/windows.h
/opt/ros/humble/include/dds/ddsrt/sync.h
/opt/ros/humble/include/dds/ddsrt/threads
/opt/ros/humble/include/dds/ddsrt/threads/freertos.h
/opt/ros/humble/include/dds/ddsrt/threads/posix.h
/opt/ros/humble/include/dds/ddsrt/threads/windows.h
/opt/ros/humble/include/dds/ddsrt/threads.h
/opt/ros/humble/include/dds/ddsrt/time
/opt/ros/humble/include/dds/ddsrt/time/freertos.h
/opt/ros/humble/include/dds/ddsrt/time.h
/opt/ros/humble/include/dds/ddsrt/types
/opt/ros/humble/include/dds/ddsrt/types/posix.h
/opt/ros/humble/include/dds/ddsrt/types/vxworks.h
/opt/ros/humble/include/dds/ddsrt/types/windows.h
/opt/ros/humble/include/dds/ddsrt/types.h
/opt/ros/humble/include/dds/ddsrt/xmlparser.h
/opt/ros/humble/include/dds/export.h
/opt/ros/humble/include/dds/features.h
/opt/ros/humble/include/dds/security
/opt/ros/humble/include/dds/security/core
/opt/ros/humble/include/dds/security/core/dds_security_fsm.h
/opt/ros/humble/include/dds/security/core/dds_security_plugins.h
/opt/ros/humble/include/dds/security/core/dds_security_serialize.h
/opt/ros/humble/include/dds/security/core/dds_security_timed_cb.h
/opt/ros/humble/include/dds/security/core/dds_security_types.h
/opt/ros/humble/include/dds/security/core/dds_security_utils.h
/opt/ros/humble/include/dds/security/core/shared_secret.h
/opt/ros/humble/include/dds/security/dds_security_api.h
/opt/ros/humble/include/dds/security/dds_security_api_access_control.h
/opt/ros/humble/include/dds/security/dds_security_api_authentication.h
/opt/ros/humble/include/dds/security/dds_security_api_cryptography.h
/opt/ros/humble/include/dds/security/dds_security_api_defs.h
/opt/ros/humble/include/dds/security/dds_security_api_err.h
/opt/ros/humble/include/dds/security/dds_security_api_types.h
/opt/ros/humble/include/dds/version.h
/opt/ros/humble/include/ddsc
/opt/ros/humble/include/ddsc/dds.h
/opt/ros/humble/include/idl
/opt/ros/humble/include/idl/attributes.h
/opt/ros/humble/include/idl/endian.h
/opt/ros/humble/include/idl/export.h
/opt/ros/humble/include/idl/expression.h
/opt/ros/humble/include/idl/file.h
/opt/ros/humble/include/idl/md5.h
/opt/ros/humble/include/idl/misc.h
/opt/ros/humble/include/idl/print.h
/opt/ros/humble/include/idl/processor.h
/opt/ros/humble/include/idl/retcode.h
/opt/ros/humble/include/idl/scope.h
/opt/ros/humble/include/idl/stream.h
/opt/ros/humble/include/idl/string.h
/opt/ros/humble/include/idl/symbol.h
/opt/ros/humble/include/idl/tree.h
/opt/ros/humble/include/idl/version.h
/opt/ros/humble/include/idl/visit.h
/opt/ros/humble/include/idlc
/opt/ros/humble/include/idlc/generator.h
/opt/ros/humble/include/idlc/options.h
/opt/ros/humble/lib
/opt/ros/humble/lib/aarch64-linux-gnu
/opt/ros/humble/lib/aarch64-linux-gnu/cmake
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/CycloneDDSConfig.cmake
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/CycloneDDSConfigVersion.cmake
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/CycloneDDSTargets-none.cmake
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/CycloneDDSTargets.cmake
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/idlc
/opt/ros/humble/lib/aarch64-linux-gnu/cmake/CycloneDDS/idlc/Generate.cmake
/opt/ros/humble/lib/aarch64-linux-gnu/libcycloneddsidl.so.0.10.3
/opt/ros/humble/lib/aarch64-linux-gnu/libdds_security_ac.so
/opt/ros/humble/lib/aarch64-linux-gnu/libdds_security_auth.so
/opt/ros/humble/lib/aarch64-linux-gnu/libdds_security_crypto.so
/opt/ros/humble/lib/aarch64-linux-gnu/libddsc.so.0.10.3
/opt/ros/humble/lib/aarch64-linux-gnu/pkgconfig
/opt/ros/humble/lib/aarch64-linux-gnu/pkgconfig/CycloneDDS.pc
/opt/ros/humble/share
/opt/ros/humble/share/doc
/opt/ros/humble/share/doc/CycloneDDS
/opt/ros/humble/share/doc/CycloneDDS/CHANGELOG.rst
/opt/ros/humble/share/doc/CycloneDDS/CONTRIBUTING.md
/opt/ros/humble/share/doc/CycloneDDS/CYCLONEDDS_QUALITY_DECLARATION.md
/opt/ros/humble/share/doc/CycloneDDS/LICENSE
/opt/ros/humble/share/doc/CycloneDDS/NOTICE.md
/opt/ros/humble/share/doc/CycloneDDS/README.md
/usr
/usr/share
/usr/share/doc
/usr/share/doc/ros-humble-cyclonedds
/usr/share/doc/ros-humble-cyclonedds/changelog.Debian.gz
/usr/share/doc/ros-humble-cyclonedds/copyright
/opt/ros/humble/lib/aarch64-linux-gnu/libcycloneddsidl.so
/opt/ros/humble/lib/aarch64-linux-gnu/libcycloneddsidl.so.0
/opt/ros/humble/lib/aarch64-linux-gnu/libddsc.so
/opt/ros/humble/lib/aarch64-linux-gnu/libddsc.so.0
v-kiniv commented 8 months ago

I've setup fresh VM with Humble distro and it turn out that the problem in CmakeLists. Try this branch https://github.com/v-kiniv/rws/pull/8

MoffKalast commented 8 months ago

Ah fantastic, it compiles now on my end as well (with a fair few warnings).

Cyclone works:

[INFO] [rws_server-1]: process started with pid [9719]
[rws_server-1] [INFO] [1703696353.788895988] [rws_server]: RWS start listening on port 5002

FastDDS does not:

INFO] [rws_server-1]: process started with pid [9378]
[rws_server-1] Use rmw_fastrtps_dynamic_cpp instead of rmw_fastrtps_cpp as RMW implementation.
[ERROR] [rws_server-1]: process has died [pid 9378, exit code 255, cmd '/home/osboxes/colcon_ws/install/rws/lib/rws/rws_server --ros-args -r __node:=rws_server --params-file /tmp/launch_params_ua04_dto'].

Given that Fast is now the default that remains a bit of an issue. I don't really understand why this even makes a difference, it should be abstracted away at this layer. Does it talk directly to the DDS and not through ROS?

Regardless, I've continued testing it on Cyclone and I did manage to get some topics through, but not all of them are found:

[rws_server-1] [ERROR] [1703696421.082626859] [client_handler_0]: Failed to subscribe to topic: "Topic tf_static not found"
[rws_server-1] [ERROR] [1703696421.245613375] [client_handler_0]: Failed to subscribe to topic: "Topic /pose not found"
[rws_server-1] [ERROR] [1703696421.253054332] [client_handler_0]: Failed to subscribe to topic: "Topic /received_global_plan not found"
[rws_server-1] [ERROR] [1703696421.253974720] [client_handler_0]: Failed to subscribe to topic: "Topic /scan not found"
[rws_server-1] [ERROR] [1703696421.539364059] [client_handler_0]: Failed to subscribe to topic: "Topic /map not found"
[rws_server-1] [ERROR] [1703696421.558143910] [client_handler_0]: Failed to subscribe to topic: "Topic /local_costmap/costmap not found"
[rws_server-1] [ERROR] [1703696421.619571044] [client_handler_0]: Failed to subscribe to topic: "Topic /temperature/rp2040 not found"

Most notably I can't seem to get any TF data across, which limits testing on all the other messages that depend on it for message frame transforms. I'm not sure if it's something to do with topic discovery or just that the message definitions have changed since Galactic? I would really doubt the latter though. I'll open a new issue for that I suppose.

v-kiniv commented 8 months ago

Regarding FastDDS, you can use it, but note that there's two FastDDS implementations, rws requires you to use rmw_fastrtps_dynamic_cpp implementation, because default one does not allow to do dynamic introspection of RCL interfaces.

Regarding missing topics, make sure that you are compiling rws in the same environment as your workspace. Important thing here, is that rws should be aware of all RCL interfaces your workspace is using during rws build. For example, I see that you have /temperature/rp2040, I assume that this topic is using custom interface(typically a dedicated package named foo_msgs and containing msg/Foo.msg), in this case, if you are building rws on ROS2 system level, outside of workspace(source /opt/ros/humble/setup.bash), rws will not be aware that there's interface like foo_msgs. The same is with received_global_plan topic, if it's part of nav2 for example, you should source nav2 workspace before compiling rws. Long story short - you should put rws in your workspace src folder and rebuild it if any of your interface packages changed.

I'm not sure that's the cause of the problem you have with the topics, but I've installed this package and connected to rws with Foxglove, and there's no issues with /tf topic or /monitored_planning_scene, which uses custom interface(moveit_msgs/msg/PlanningScene), seems like all topics works just fine.

MoffKalast commented 8 months ago

I'll re-source and recompile to be sure, but all of these are standard messages. The /temperature/rp2040 e.g. is a typical sensor_msgs/Temperature. I did have some custom services that also threw additional errors, but switching those to standard ones is something I could probably live with or fix sometime later down the line so I figured there's no point in pressing that issue yet. Fwiw this is what I'm attempting to replace the backend on, hence the various usual messages.

connected to rws with Foxglove

Hmm well I'm only testing the rosbridge protocol side so I wouldn't know how that part behaves, I might need to check if roslib.js needs updating. Given that some topics work and some dont it may also be some sensitivity to topic name slashes or whitespace, topic params or something that's ever so slightly different than rosbridge's implementation.

I'll do some smoke tests and report back once I know more.

rws requires you to use rmw_fastrtps_dynamic_cpp implementation, because default one does not allow to do dynamic introspection of RCL interfaces

Ah makes sense I suppose.

You know it's funny, being able to choose the middleware has been touted as a big win in ROS 2, but all it's seemingly lead to is a lack of standardization and more and more packages or robot stacks only supporting certain middlewares (e.g. Turtlebot 4 can't run Cyclone because of memory overhead). One day we'll wake up and most of ROS 2 of the same LTS won't even be intercompatible with itself anymore, smh.

v-kiniv commented 8 months ago

but switching those to standard ones is something I could probably live with

No need to, rws works fine with custom interfaces, just make them "visible" to rws at build time. My point was that if you use custom interfaces and "don't source them", rws will don't know how to handle such topics.

Hmm well I'm only testing the rosbridge protocol side so I wouldn't know how that part behaves

When connecting from Foxglove, I use "Rosbridge" protocol option, not the "Foxglove Websocket", so it shouldn't differ from rosilb.js. image

You mentioned Foxglove, but I'm not sure if you've used it, I'll just assume you haven't. I would suggest you to try it and see if you can subscribe to the topics in Foxglove. There's topics panel and Raw Message widget, which allows you to check raw data from the topic, basically you can use it as RQT, but for websockets connection. image

You know it's funny, being able to choose the middleware has been touted as a big win in ROS 2, but all it's seemingly lead to is a lack of standardization and more and more packages or robot stacks only supporting certain middlewares

Freedom is not cheap) I'm more surprised how things mishandled with the whole Gazebo-Ignition stuff, very confusing and hard to use. I haven't worked with ROS for a while, and tried to setup Humble with nav2 turtlebot3 demo on Ubuntu22 to check if I have the same problem with topics. Turtlebot3 requires Gazebo classic, Humble requires Ubuntu22, Ubuntu22 does not ship Gazebo classic, only Ignition... I think OSRF just needs to slow down a bit and don't pump out releases each year.

MoffKalast commented 8 months ago

When connecting from Foxglove, I use "Rosbridge" protocol option, not the "Foxglove Websocket", so it shouldn't differ from rosilb.js.

Ah yes I haven't used it in a long while, forgot that was still supported on top of their new protocol. I can totally get the tf data and the rest to render through it.

Looking at it a bit closer, the main tf topic subscriber was indeed missing the leading slash on my implementation (which rosbridge automagically fixed internally I suspect), now it connects properly and the ones dependent on it are working ok now. Sending cmd_vel from web also works so topic publishers should be good.

There is still something really weird with tf at times:

https://github.com/v-kiniv/rws/assets/9977799/42d9e101-9a5e-45ee-97d9-ca4dadc4df39

RWS left and Rosbridge right running at the same time on different ports, streaming from a small bag that includes a drive around an apartment with odometry and lidar.

how things mishandled with the whole Gazebo-Ignition stuff, very confusing and hard to use

I think the best part about that was how everything got renamed to Ignition for a while, then they got the cease and desist for trademark infringement or something so it was renamed back to just Gazebo and the old one is Gazebo Classic which will surely confuse absolutely no one.

Turtlebot3 requires Gazebo classic, Humble requires Ubuntu22, Ubuntu22 does not ship Gazebo classic, only Ignition...

I remember that being possible to set up without too much hassle, the Nav2 demo is after all TB3 + Humble + Classic and it got auto installed. Then I remember then also trying to install VRX or something beside it which needed another version and apt uninstalled the first one while somehow messing up the deps so neither worked anymore 😄🔫

MoffKalast commented 8 months ago

Okay I seem to have it pinned down that /tf_static is actually what's missing, although it does eventually get through after a few minutes. The QoS profile seems mismatched though so I'm not sure how it gets any data at all.

Type: tf2_msgs/msg/TFMessage

Publisher count: 1

Node name: rosbag2_player
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: PUBLISHER
GID: 01.10.68.29.53.b9.2e.2b.42.c0.8e.5b.00.00.1c.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RELIABLE
  History (Depth): KEEP_LAST (10)
  Durability: TRANSIENT_LOCAL
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Subscription count: 1

Node name: rws_server
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.e4.6b.d5.23.e9.21.d3.2a.f7.ab.00.00.54.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RELIABLE
  History (Depth): KEEP_LAST (10)
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

And on the web end:

        this.tf_static_topic = new ROSLIB.Topic({
            ros: rosbridge.ros,
            name: '/tf_static',
            messageType: 'tf2_msgs/msg/TFMessage'
        });

        this.tf_static_listener = this.tf_static_topic.subscribe((msg) => {
            //only gets a message every once in ~several minutes
            console.log(msg) 
        });

I'll have to check if roslibjs has any way of specifying QoS values but last I checked it wasn't a thing yet, so it would have to be autodetected and matched once the topic is found I guess.

v-kiniv commented 8 months ago

RWS left and Rosbridge right running at the same time on different ports, streaming from a small bag that includes a drive around an apartment with odometry and lidar.

Just now came back to computer and started testing your bag

The QoS profile seems mismatched though so I'm not sure how it's even getting through.

Can you try to add latch: true to new ROSLIB.Topic({})?

v-kiniv commented 8 months ago

Can you try to add latch: true to new ROSLIB.Topic({})?

Sorry for misleading message, latch param is for advertiser. Let me check on the whole QoS thing

MoffKalast commented 8 months ago

Can you try to add latch: true to new ROSLIB.Topic({})?

Sorry for misleading message, latch param is for advertiser.

Still seems to subscribe as volatile yep. Weird that it's not used for subscribers as well, Rosbridge itself also has this huge problem I ran into a while back where if the web subscriber comes up before the native nodes it'll set up the DDS topic with wrong/default QoS and block them from publishing until the entire system is reset 🤦

Just now came back to computer and started testing your bag

Eh no rush, I just had some extra time and a hunch that it was something to do with the static tfs so I wanted see if it's right or not.

v-kiniv commented 8 months ago

Can you check https://github.com/v-kiniv/rws/pull/9?

Weird that it's not used for subscribers as well, Rosbridge itself also has this huge problem I ran into a while back where if the web subscriber comes up before the native nodes it'll set up the DDS topic with wrong/default QoS and block them from publishing until the entire system is reset

Yeah, it would be better if parameter was not specified explicitly, system would use the value specified by the advertiser.

MoffKalast commented 8 months ago

Well so far so good, all the standard stuff seems to be working as it should with #9, though I need to do more substantial testing to really confirm 👍

As a quick comparison I'm seeing about 13% cpu usage with rosbridge and 2% with rws (in a VM), and I'm sure the difference would be even larger if I were sending over any high frequency topics that clog rclpy. Overall it's looking really promising. Rosbridge on ROS 2 broke CBOR and I had to remove it, so if the readme is accurate here then I should be able to optimize transport further with it and the other compression options.

Still having some issues with the custom services part but I'll have to figure out if I'm even setting up the web service clients correctly. Regardless there are some errors that pop up when those try to make calls in case it's something that needs fixing:

[rws_server-1] 
[rws_server-1] >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
[rws_server-1] This error state is being overwritten:
[rws_server-1] 
[rws_server-1]   'rmw_serialize: invalid data size, at ./src/rmw_node.cpp:1727'
[rws_server-1] 
[rws_server-1] with this new error message:
[rws_server-1] 
[rws_server-1]   'Handle's typesupport identifier (rosidl_typesupport_cpp) is not supported by this library, at ./src/type_support_dispatch.hpp:111'
[rws_server-1] 
[rws_server-1] rcutils_reset_error() should be called after error handling to avoid this.
[rws_server-1] <<<
v-kiniv commented 8 months ago

Well so far so good, all the standard stuff seems to be working as it should

Until next ROS release)

Still having some issues with the custom services part but I'll have to figure out if I'm even setting up the web service clients correctly.

Also, make sure that the service interface type is known to rws at build time. Just to check if there's difference, try to switch between cyclone/fastdds.

If it's still not resolved, please share information regarding the service type you are trying to call.

I tried to call /save_map (nav2_msgs/SaveMap) from Foxglove(there's Call Service panel) and seems like it's working on both cyclone and fastdds.

v-kiniv commented 8 months ago

I will close this issue as we resolve build errors on Humble. Thank you for your help with this. If you still have problems with the QoS topic, services, etc., feel free to open another issue.

MoffKalast commented 8 months ago

Sounds good, last I checked it was mostly working so might as well merge and close it. I've been pulled back into some ROS 1 stuff again, I'll be back in a bit to finalize this integration, but I'm not yet sure when. I'll open some new issues then if I run into any more problems. Thanks for the assistance 😄

Until next ROS release

Until May you mean, haha