rosblox / blox-mocap4ros2-optitrack

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Problems receiving data #1

Open birneamstiel opened 2 days ago

birneamstiel commented 2 days ago

Hey @maxpolzin, thanks for publishing this!

I have some problems setting this up. When running docker compose up all services are launching and the ros-mocap4ros2-optitrack service seems to connect properly to the motive software (running actually on the same machine):

ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.331413952] [mocap_optitrack_driver_node]: Trying to connect to Optitrack NatNET SDK at 10.147.20.183 ...
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.370309808] [mocap_optitrack_driver_node]: ... connected!
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373149184] [mocap_optitrack_driver_node]:
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [Client] Server application info:
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373278203] [mocap_optitrack_driver_node]: Application: Motive (ver. 3.1.3.1)
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373304699] [mocap_optitrack_driver_node]: NatNet Version: 4.1.0.0
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373314503] [mocap_optitrack_driver_node]: Client IP:
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373323076] [mocap_optitrack_driver_node]: Server IP:10.147.20.183
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.373330915] [mocap_optitrack_driver_node]: Server Name:
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.374832221] [mocap_optitrack_driver_node]: Mocap Framerate : 120.00
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.375012784] [mocap_optitrack_driver_node]: Configured!
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1] [INFO] [1729674776.375723062] [mocap_optitrack_driver_node]: Activated!
ros-mocap4ros2-optitrack-1  | [mocap_optitrack_driver_main-1]

However, I don't see any topics published, neither on the host nor when connecting to the container ros-mocap4ros2-optitrack. I've the feeling there are some networking / connection problems where the data frames can't be retrieved within the docker containers.

Did you experience similar problems when running this yourself?

maxpolzin commented 2 days ago

What is the user id group id that you are running the things with? If they differ between in the container and the host, this is an issue in ROS2.

Do you see the topics, but don't receive messages?

birneamstiel commented 2 days ago

Thanks for your quick reply!

The user is indeed different but the user id is the same – however, even with different users the topics should be visible within the docker container, shouldn't they?

Maybe going one step back: the ros-mocap4ros2-optitrack service is supposed to publish some topics, right?

Here's what I'm trying and the resulting topics I get:

xxx@DESKTOP-PC:~/optitrack_wrapper/blox-mocap4ros2-optitrack$  id -u ${whoami}
1000
xxx@DESKTOP-PC:~/optitrack_wrapper/blox-mocap4ros2-optitrack$ docker  exec -it --user 1000 blox-mocap4ros2-optitrack-ros-mocap4ros2-optitrack-1 bash
ros@docker-desktop:/$ id -u ${whoami}
1000
ros@docker-desktop:/$ source ros_entrypoint.sh
ros@docker-desktop:/$ ros2 topic list
/parameter_events
/rosout