lambdaprime / jros2client

Java module to interact with ROS2 (Robot Operating System)
5 stars 3 forks source link

Message mismatch #1

Closed marlow-fawn closed 1 year ago

marlow-fawn commented 1 year ago

Hello,

Just started using this project so I may have missed some configuration step. I'm getting the following warnings when following the tutorial:

     [java] Aug 14, 2023 1:21:26 PM pinorobotics.rtpstalk.impl.spec.behavior.liveliness.BuiltinParticipantMessageReader#1626877848-ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
     [java] WARNING: Mismatch between message types. Message directed to reader ENTITYID_UNKNOWN but since current reader message type differs, it is ignored: Data message type mismatch: expected value <class pinorobotics.rtpstalk.impl.RtpsTalkParameterListMessage>, actual value <class pinorobotics.rtpstalk.messages.RtpsTalkDataMessage>

A similar message exists for the subscriber.

Both the subscriber and publisher are able to talk to native ros2 topics, but not to each other. Any insight would be great.

marlow-fawn commented 1 year ago

Just following up - it's due to a different DDS implementation. It seems like the default is FastRTPS, and Humble uses Cyclone by default.

dbortoluzzi commented 1 year ago

Just following up - it's due to a different DDS implementation. It seems like the default is FastRTPS, and Humble uses Cyclone by default.

Similar problem for me @marlow-fawn, I think.

18:24:45.754 [783323948-UserDataServiceReceiver] ERROR p.r.i.s.t.RtpsMessageReceiver#783323948-UserDataServiceReceiver - Read submessage size does not match expected: expected value <36.0>, actual value <32.0>
id.xfunction.PreconditionException: Read submessage size does not match expected: expected value <36.0>, actual value <32.0>

How can I change DDS implementation? Reading from console, I see that jros2client uses RTPSTALK as default: image

lambdaprime commented 1 year ago

Hi @marlow-fawn, @dbortoluzzi

How can I change DDS implementation? Reading from console, I see that jros2client uses RTPSTALK as default:

That is right. rtpstalk allows to communicate with FastRTPS, Cyclone and itself. rtpstalk is Java based when FastRTPS, Cyclone are not.

The idea of jrosclient is to be pure Java client which means allowing it to switch to native FastRTPS, Cyclone is not possible.

You can ignore the warning for liveliness for now. I have created issue for rtpstalk to fix it.