Problem with ros1 Bridge bridging a custom mesage
environment: ros: kinetic, ros2 ardent, ubuntu 16.0.4 I am using a package of custom messages There are 6 messages in the package. 5 of the 6 are working in the ros1 bridge. The package names, message names and message formats are equivalent in both ros and ros2. I have followed the steps outlined in previous posts and the bridge instructions, as far as adding the message package info the the ros1bridge build (package and CMakeLists).
I have traced the problem into the EmPy generation. The message mappings and factories are not being generated. This is as far as I have traced the problem.
Please let me now how best to proceed to identify if this is a problem i my message/package or a bug in the bridge.
I assume you will need to look at specific files and packages. Lmk how best to get them to you. Thank you in advance,
Dennis
ROS Message: file is GvrbotMobilityValues.msg
in package gvrbot_msgs
uint16 LeftDACOutput
uint16 RightDACOutput
int32 LeftPIDError
int32 LeftPIDPTerm
int32 LeftPIDITerm
int32 LeftPIDDTerm
int32 RightPIDError
int32 RightPIDPTerm
int32 RightPIDITerm
int32 RightPIDDTerm
uint16 ActualDriveVelocitySetPoint
uint16 ActualTurnVelocitySetPoint
int16 LeftTrackEncoderSpeedSetPoint
int16 RightTrackEncoderSpeedSetPoint
uint32 AverageLoopTime
uint32 MaximumLoopTime
uint16 NumberOfBadPackets
ROS2 message: GvrbotMobilityValues.msg
in package gvrbot_msgs
uint16 left_dac_output
uint16 right_dac_output
int32 left_pid_error
int32 left_pid_p_term
int32 left_pid_i_term
int32 left_pid_d_term
int32 right_pid_error
int32 right_pid_p_term
int32 right_pid_i_term
int32 right_pid_d_term
uint16 actual_drive_velocity_set_point
uint16 actual_turn_velocity_set_point
int16 left_track_encoder_speed_set_point
int16 right_track_encoder_speed_set_point
uint32 average_loop_time
uint32 maximum_loop_time
uint16 number_of_bad_packets
One more thing. There is another message named GvrbotMobilityData
. This message works. Just wanted to mention this as it is coincidental that a similar named message does not work. The other four messages are name differently: GvrbotComms
, GvrbotOrientation
, GvrbotState
, and GvrbotPowerData
yaml file:
ros1_package_name: 'gvrbot_msgs'
ros1_message_name: 'GvrbotMobilityValues'
ros2_package_name: 'gvrbot_msgs'
ros2_message_name: 'GvrbotMobilityValues'
ros1_package_name: 'gvrbot_msgs'
ros1_message_name: 'GvrbotMobilityData'
ros2_package_name: 'gvrbot_msgs'
ros2_message_name: 'GvrbotMobilityData'
I apologize for adding info to the answer and answer/comments section. Thanks for pointing my error out! Also, as I was redoing this question, I now realize that the attributes within the two messages are different. I am assuming this is causing the issue.
The ROS message is legacy and cannot be changed. The original format gives idl errors in ROS2. Hence this must be why I used the alternate format. The ROS message is the only one of this CamelCase format. The others are use "_". Must have been an oversight from original development. I forgot about this difference as I defined the ROS2 messages months ago.
I can try to add the fields to the yaml file. IF the yaml file is actually supported. I did not see it referenced in the generator code. Please advise
Dennis (I apologize as I cannot seem to get the formatting in the editor to work).
Dirk I did not have any luck with the mapping file. Here is the file
ros1_package_name: 'gvrbot_msgs'
ros1_message_name: 'GvrbotMobilityValues'
ros2_package_name: 'gvrbot_msgs'
ros2_message_name: 'GvrbotMobilityValues'
fields_1_to_2:
LeftDACOutput: 'left_dac_output'
RightDACOutput: 'right_dac_output'
LeftPIDError: 'left_pid_error'
LeftPIDPTerm: 'left_pid_p_term'
LeftPIDITerm: 'left_pid_i_term'
LeftPIDDTermr: 'left_pid_d_term'
RightPIDError: 'right_pid_error'
RightPIDPTerm: 'right_pid_p_term'
RightPIDITerm: 'right_pid_i_term'
RightPIDDTerm: 'right_pid_d_term'
ActualDriveVelocitySetPoint: 'actual_drive_velocity_set_point'
ActualTurnVelocitySetPoint ...
It might help if you share the messages in question. Especially the one which doesn't work.
The mapping rules should be specified in the ROS 2 message package.
Dirk Thanks I tried it again and I still do not have any luck. I followed the steps as previously outlined for the CMakeLists and package files for the gvrbot_msgs package within a ros2_overlay project. How best to proceed? Can you point me to the code that does the processing of the yaml
The information is extracted here: https://github.com/ros2/ros1_bridge/b...
If you can share a simple example which can be run / reproduced with a few command lines than I might be able to take a closer look.