Hello,
I'm writing a node to convert from a rosbag to a .mat file using matlab's api for this. I am subscribing to the topics contained in the rosbag and via a callback function I can read the respective topic only when there is new data. The issue might be that I need to know when the rosbag ended so I can close the .mat file. Is there any way to know when the rosbag finished? I was not able to find any topic for example that might tell me the status of the rosbag.
Thanks for the help.
↧
How do I know when rosbag finished? (by code - without looking at the terminal)
↧
In ros gmapping, how to use Intel Research Lab dataset?
I don't know how to use the Intel Research Lab dataset (.clf). Should I read the file and publish the lase_scan and tf topic? If so,how should I do in detail? thanks.
↧
↧
Interactive Marker with rosbag "ROS Time moved backwards"
I'm using rqt_bag to visualize a rosbag in RViz. Independently of that, I publish a interactive marker that changes colors based on a topic being published. This works well, until I move backwards in the rosbag, then the interactive marker throws an exception because the ROS time moved backwards. Specifically, the sleep() method in the rospy timer (http://docs.ros.org/jade/api/rospy/html/rospy.timer-pysrc.html).
I've tried changing the interactive marker header stamp to rospy.time.now() and I've tried just a static non-changing time.
I've also tried deleting the interactive marker whenever I go backwards in time, but the error procs before I can delete the marker.
Am I trying to do something that is not possible with the way Interactive Markers work?
I have use_sim_time set to true and --clock set.
Thanks
↧
How do you expand the displayed data in rqt_bag?
I'm playing back data from a rosbag file and I want to view the entire NMEA "GGA" sentence in real-time. However, when I try to enlarge the play-back window I get this:
![image description](/upfiles/14621416964485492.jpg)
The end of the sentence is cut off and replaced with "..." even though there is plenty of room in the window to print the whole message. Does anyone know how to force rqt_bag to display the whole sentence? It seems like a bug with rqt_graph.
Before anyone suggests it, I can't view the sentence by publishing the it because of an unrelated problem.
↧
rosbag randomly missing topics on record
Hi all.
We've got a very weird case. Our configuration:
- main_computer: running roscore
- slave_A_computer (ROS_MASTER_URI=main_computer)
- slave_B_computer (ROS_MASTER_URI=main_computer)
- slave_C_computer (ROS_MASTER_URI=main_computer)
- ROS: indigo
- Ubuntu 14.04 (x86)
All computers are connected in one GigE network and synced using chrony. On main_computer we run https://github.com/ros-drivers/nmea_navsat_driver and on each slave computers we run GigE camera driver and record the image and gps topics (along with some other low bandwidth stuff (diagnostics, tf, etc)) with rosbag (using c++ program, i.e. rosrun rosbag record). Recordings on all 3 computers are done simulatenously but locally on each computer.
Now a mysterious thing that happens is that in every e.g. 1 out of 100 bags recorded on slave computers we do not get ONE of the gps topics (out of 4 that nmea_navsat_driver publishes). So for instance slave_A and slave_B have all the topics but on slave_C `/gps/fix` would be missing. This is all happening on a field robot during operation and where it is impossible to actually pause and debug.
So my question is how to debug an issue like this? Clearly the topic is being advertised and active since 2 computers get it. Also since the 3rd computer gets 3 of 4 topics from the nmea_navsat_driver the network link is up. Is it then a rosbag tool that is not able to build up all socket connections? Can I somehow constantly log a list of active topics for every computer?
thx upfront
↧
↧
How to split a recorded rosbag file ?
Ubuntu 12.04 and fuerte
I have a bag file of 400 seconds length.
I would like to split it into two bag files of 150 seconds and 250 seconds.
There is an option to split bag files while recording using option --split, but now I already have a recorder one.
What can be done?
Thanks
↧
rosbag c++ API bug at execution
Hi everyone, i'm having a real weird problem with the rosbag c++ API.
I'm using QtCreator to develop on Ubuntu 14.04.
Whenever I try to use a class from the rosbag library (rosbag::Bag or rosbag::View for instance), i can launch my program within QtCreator (Compile & Run) and everything works fine. But whenever i try to launch the generated .exe by double-clicking it, NOTHING happens at all (the program doesn't launch and nothing appears in system monitor). I can launch it by prompt line too, but it won't work for me (i launch other bash commands with QProcess and it closes the app..), i really need to be able to launch the .exe by double clicking it. I must say i have no clue about what the problem could be (permissions i guess? or something like this..).
I tried to give rights to the .exe file by doing a chmod -x on it, but when i double click it i get this error message :
Invalid url: '/local/etienne/QtWorkspace/build-test-Desktop-Debug/test' given, exiting
No ':' in the uri
I hope someone will be able to help me, thanks in advance,
Etienne
↧
segfault when reading rosbag
Hi all,
I'm trying to parse a rosbag file. According to the guide here, I wrote something like this:
rosbag::Bag bag;
std::vector topics;
std::cout << "Opening " << filename_ << std::endl;
bag.open(filename_.c_str(), rosbag::bagmode::Read);
std::cout << "Mode: " << bag.getMode() << std::endl;
topics.push_back(std::string("/Imu"));
topics.push_back(std::string("/joint_states"));
rosbag::View view(bag, rosbag::TopicQuery(topics));
foreach(rosbag::MessageInstance const m, view) {
std::cout << "Found message of type " << m.getDataType() << std::endl;
if(m.getDataType().compare("sensor_msgs/Imu") == 0) {
sensor_msgs::ImuConstPtr s = m.instantiate();
cout << "S = " << s << std::endl;
double ax = s->linear_acceleration.x;
}
The address printed by S is not NULL, but when I reach the last line to get the data, I get a SEGFAULT.
↧
rosbag playback speed
Hi all,
We have some sensor data that are saved as .csv files (data+timestamp) from a robot, which does not run ROS. To run some algorithms, I converted once such file into a ROS bag file using a python script.
After setting the /use_sim_time parameter and when playback this bag file with rosbag play --clock abc.bag, all the data seems to be flushed at once.
I need to know what determines the natural play speed of a bag file. I thought it is done using the header.stamp
Thank you in advance
CS
↧
↧
how to sync two ROS topics by adjusting the time stamp
**Actual Issue:**
I have a topic published with images from a camera and another topic with details of point cloud.
When I plot these two topics, there is a time lag between the two plots.
Is there any method to synchronize this time lag by adjusting the time stamp of point cloud message?
I am using rosbag play for the above mentioned purpose.
**Re-creating the Scenario**
I tried to simulate the above scenario using the below mentioned points:
i. Created a subscriber node which subscribe to the topic(/point_cloud) with point cloud data.
ii. Inside the callback function, I copied the message to a new pointer variable of the same type (sensor_msgs::PointCloud2) and incremented the timestamp by 3sec (The debug print shows that the timestamp has been successfully updated).
iii. Then I published the modified point cloud data in a new topic(/point_cloud_new).
iv. Created two instances of rviz which subscribes to the two topics, /point_cloud and /point_cloud_new respectively.
v. Since the timestamp of /point_cloud_new was incremented by 3sec, I expected a 3sec delay between the two plots in the rviz. But it is not happening.
Since I am new to ROS, I am not sure whether it is the correct method to approach this issue.
Please comment on the actual issue and the scenario re-created.
Please help me to sort out this issue.
↧
How to playback Rosbag pointcloud2 files
Hi, I'm currently trying to playback a rosbag file made with pointcloud2, and I can do it with the rviz software, but for my purposes, I need to be able to go back and forth in the video (like you would in a media player with a regular video) , not just in one direction. Is there any way to do this?
↧
How do I append/add to a rosbag file without overwriting it in Python?
Basically I was testing recording data to a rosbag using a timestamp.
I noticed that every time I open and close the file it just rewrites the data, so I just leave the file open when the program starts and close it when it ends. However if I want to write to that same file it just overwrites all of the data.
How can I just append/add onto the same bag file?
↧
rosbag only record at edge trigger
Hi,
Is it possbile to have rosbag only record a topic when this topic has a certain value, e.g. 0, 1, 2 and ignore 0.1 - 0.9, 1.1 - 1.9, etc. to reduce the amount of data being recorded?
Thanks.
↧
↧
How to convert Rosbag Pointcloud2 to Mp4
So I have a bunch of rosbag files that only contain a pointcloud2 topic. I need to be play through these, and have accurate times for them, because I'm using them to tag data. This means the typical way of playing them back through rviz doesn't work for what I need. I thought I had a solution which was to use the convert_pointcloud_to_image command, and output the image to a new stream, and then use rqt to record that stream. The problem is that this isn't playing with the real times that the video should have, or in other words, it has an inconsistent frames per second, which means the timestamps are meaningless. So what I'm trying to do now is extract images from this stream using the image_view extract_images command, and the pass those images through mencoder to convert them to a video. The problem I'm now having is that my original rosbag file says it has 16793 messages, which means I need at least that many images to be created if I'm not mistaken; however, when I run the extract_images command on the converted stream, no matter what I put in the fps parameter, it still only produces somewhere on the range of 5000 images, and I'm not sure why. Does anyone know what I'm doing wrong here perhaps? Is there a better way to do what I'm trying to achieve?
↧
When will rosbag::Player be released?
Hi all,
I just found out about rosbag functionality and would very much like to add playback buttons to an application I'm currently writing.
I've found the rosbag::Player class. Documentation states:
PRIVATE. Player class to abstract the interface to the player.
This API is currently considered private, but will be released in the future after view.
Could anyone give a prediction on when this class might be released, so that I can decide whether to wait for that or not?
Thank you kindly in advance.
↧
De-noise images in rosbag
I have a rosbag with a bunch of IMU measurements and image data. In order to use the FAST detector of OpenCV, I want to de-noise my image data. For this I would preferably use OpenCV (C++ or Python). In the end the rosbag should be identical to the original rosbag except the modified images.
↧
rosbag in launch file not saving properly
I can successfully save data through command line tools (rosbag record -O mybag.bag /state) but when I convert this to a launch file implementation it does not save the "mybag.bag" file properly or I just don't know where this file saves to. I know the rosbag node is working because I can see it subscribing to /state in rqt_graph. Any help on this is greatly appreciated.
↧
↧
How to convert sick lms logged data .log to rosbag file .bag
Hi, ROS users,
I am quite new to ROS. Now I have a question cannot solve, please help me, sincerely.
Now I want to use Gmapping to make 2D grid occupancy map using logged SICK LMS data. I think the way to solve this question is:
(1) SICK LMS logged data ----> (2) ROS bag logged data ----> (3) by using gmapping, obtain 2D grid occupancy map.
Now I've already solve the step from (2)----->(3), so the question is how can I convert (1) SICK LMS logged data to ROS bag logged data.
I have one example SICK LMS logged data in [link text](http://cres.usc.edu/radishrepository/view-one.php?name=fr079), can you help me to obtain the rosbag format data?
Thanks in advance.
sincerely.
↧
Automated rosbag on start up
My plan is to use a remote computer to create a rosbag.
I was wondering what is the best practice to automatically start a rosbag record instance after boot on an Ubuntu 14.04 Odroid system. Any experiences ?
↧
Exporting jpegs from bag file
I record my bag file using this command:
rosbag record /camera/rgb/image_raw -O kinectrgb
And
rosbag info kinectrgb.bag
For its content I get this:
path: kinectrgb.bag
version: 2.0
duration: 6.2s
start: Jun 20 2016 16:19:52.89 (1466432392.89)
end: Jun 20 2016 16:19:59.09 (1466432399.09)
size: 162.7 MB
messages: 185
compression: none [185/185 chunks]
types: sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
topics: /camera/rgb/image_raw 185 msgs : sensor_msgs/Image
But when I try to extract the images I don't get anything..
roslaunch export.launch
It says process has finished cleanly but I don't get the images in `ROS_HOME` `~/.ros`
... logging to /home/jros/.ros/log/ff16c6e0-36f1-11e6-b3d4-5c260a35b6aa/roslaunch-jros-1932.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://jros:36064/
SUMMARY
========
PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.19
NODES
/
extract (image_view/extract_images)
rosbag (rosbag/play)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[rosbag-1]: started with pid [1950]
process[extract-2]: started with pid [1951]
[ INFO] [1466432724.837729370]: Initialized sec per frame to 0.100000
[rosbag-1] process has finished cleanly
log file: /home/jros/.ros/log/ff16c6e0-36f1-11e6-b3d4-5c260a35b6aa/rosbag-1*.log
My launch file:
What am I doing wrong?
What does -d 2 mean in the launch file arg?
↧