Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to successfully play rosbag containing topics of type realsense_msgs/Notification #10743

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

uhobeike
Copy link

@uhobeike uhobeike commented Aug 3, 2022

Hello.
We are developing a robot with D435i.
I have been concerned for some time that the rosbag recorded using realsense-viewer may not play back properly.

Therefore, this Pull Request proposes a fix to resolve the issue and successfully play rosbag.
I would like to discuss whether this fix is appropriate, as it may affect other parts of the system that are not related to ros.

Environment I used

Details
Camera D435i(Connected via USB2.0)
OS Ubuntu 18.04 LTS
ROS Melodic
CPU Intel® Core™ i7-8665U CPU @ 1.90GHz × 8

Commands used(When recording rosbag)

realsense-viewer 

Commands used(Playing back recorded rosbags causes errors)

roscore
rosbag play space_existence_topic_notification.bag

Error log

ikebe@ikebe:~$ rosbag play space_existence_topic_notification.bag 
[ INFO] [1659491276.715054503]: Opening space_existence_topic_notification.bag

[FATAL] [1659491276.779427919]: Character [ ] at element [38] is not valid in Graph Resource Name [/device_0/sensor_1/notification/Frames Timeout].  Valid characters are a-z, A-Z, 0-9, / and _.

Detailed explanation of this issue

ros does not consider names containing spaces.

Reference)

Therefore, if you create a topic that contains spaces, it will fail when loaded.

However, topics of type realsense_msgs/Notification
All of them contain whitespace in the suffix.
I can solve this by using rosbag filter to remove the topic, but
However, we believe that it is difficult to parse realsense_msgs/Notification type topics without modification.

Therefore, we have proposed a modification to create topics without spaces.

Reproduction method

How to create a rosbag containing topics of type realsense_msgs/Notification

  • Environment building
    Build and install librealsense2 SDK
git clone https://github.com/IntelRealSense/librealsense
./scripts/setup_udev_rules.sh
cd librealsense
mkdir build && cd build
cmake .. -DBUILD_EXAMPLES=true
make -j8
sudo make install
sudo ldconfig
  • Launching realsense-viewer
realsense-viewer
  • Rosbag records(To have a topic of type realsense_msgs/Notification created, intentionally connect the PC to the D435i via USB 2.0.)
create-realsense_msgs-Notification-topic-2022-08-03_11.25.56.mp4

Experiment

Error

  • If you run the source in the master branch
play-space-existence-topic-notification-rosbag-2022-08-03_11.29.27.mp4

If modified

  • If the source in the master branch reflects this modification
    In the modified source, rosbag can contain topics of type realsense_msgs/Notification that do not contain spaces.
play-space-no-existence-topic-notification-rosbag-2022-08-03_11.37.35.mp4

@uhobeike uhobeike changed the title Unable to successfully replay rosbags containing topics of type realsense_msgs/Notification Unable to successfully play rosbags containing topics of type realsense_msgs/Notification Aug 3, 2022
@uhobeike uhobeike changed the title Unable to successfully play rosbags containing topics of type realsense_msgs/Notification Unable to successfully play rosbag containing topics of type realsense_msgs/Notification Aug 3, 2022
@Nir-Az
Copy link
Collaborator

Nir-Az commented Apr 2, 2023

@uhobeike thanks for the PR,
As I know the SDK use a customized version of the ROSBAG protocol.
I suggest to try playing the file using the RS ROS API.
Anyway, the development team is currently focused on ROS2 development and we will happily try to help if you see an issue on the ROS2 wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants