-
Notifications
You must be signed in to change notification settings - Fork 805
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
loadFromBag crashes in ROS2 when bag contains multiple topics #401
Comments
Thanks for the report. I've confirmed this is an issue with the following process on rolling today. I ran two talker nodes: ros2 run demo_nodes_cpp talker --ros-args -r chatter:=chatter1 ros2 run demo_nodes_cpp talker --ros-args -r chatter:=chatter2 I then recorded a bag with
By default in Thus, trying again with specifying a sqlite3 type:
And, finally the test code: TEST(RosbagHandling, multipleTopics)
{
std::string pathToBag = "/home/ryan/Dev/rosbag2_2024_02_16-00_50_47";
string topic = "chatter1";
GridMap gridMapOut;
rcpputils::fs::path dir(pathToBag);
EXPECT_TRUE(GridMapRosConverter::loadFromBag(pathToBag, topic, gridMapOut));
} I got this result from
|
I've tried determining where it's throwing, but the tutorial I wrote for debugging tests with gdb doesn't isolate it. But, you can instead just run
Thus, it's failing to deserialize, probably because it's the wrong type. This may be a different bug than you saw, but that's obviously wrong and should be fixed.
I haven't used the rosbag API's, so it may take me a bit to get familiar with it. Anyone is welcome to issue a patch. This reference doesn't help much for getting symbols. |
I also tried using VSCode to debug {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/grid_map_ros/grid_map_ros-test",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
} |
I guess that
topic
parameter was meant to be used, e.g.could be added here
The text was updated successfully, but these errors were encountered: