echoing messages from a rosbag in a docker conatiner
I have a rosbag file that publishes custom messages to a topic. I want to be able to echo these messages inside a docker container. The rosbag can run either in the docker container or on my local machine, either work. Currently I've tried to run it on my local machine but get this error when the docker container tries to echo:
[ERROR] [1635193778.825277136]: Client wants topic <TOPIC> to have datatype/md5sum [<MSG_TYPE>/adf48fd02b6cd4b1ea3d615551fe75fb], but our version has [<MSG_TYPE>/38b2ab4d4630320405ac61f4c1028689]. Dropping connection.
Is there any way to resolve this conflict?
Dockerfile
ARG ROS_VERSION=noetic
ARG VERSION=1
FROM ros:${ROS_VERSION}
RUN apt-get update
COPY ./catkin_ws .
WORKDIR /catkin_ws
docker-compose.yml
version: '3.5'
services:
ros-master:
image: ros:noetic
command: stdbuf -o L roscore
network_mode: host
restart: always
listener:
image: ros:noetic
build:
context: .
depends_on:
- ros-master
environment:
- "ROS_MASTER_URI=${ROS_MASTER_URI}"
- "ROS_HOSTNAME=listener"
command: bash -c "catkin_make && source devel/setup.bash && rostopic echo <TOPIC>"
network_mode: host
restart: always