Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 475 articles
Browse latest View live

Monitor CPU - RAM etc over ROS

$
0
0
Hi, I am using an [ODROID-XU4](http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825) on a quadrotor. On the ODROID is running ROS. To the Odroid is also connected to a camera [flea3 by PointGrey](https://www.ptgrey.com/flea3-32-mp-color-usb3-vision-sony-imx036-camera). I am launching the [pointgrey node](http://wiki.ros.org/pointgrey_camera_driver) to connect to the camera and it is working fine. I am not sure but it seems that when I increase the frequency of acquisition of the camera (from 30 Hz and greater) the quadrotor becomes a bit unstable. It does not happen all the time but sometime. Because I don't know where this behavior is coming from I thought that it could come from the CPU/RAM which are *working too much*. For this reason I was thinking if there is some tool which enables to store a rosbag file which then can be easily plotted to check the allocation of RAM and CPU when the frequency changes. Thanks in advance for your help.

Error: "Unable to convert 32FC1 image to bgr8" while extracting rbg(d?) data from a bag

$
0
0
I'm trying to extract messages of the "/camera/depth_registered/image_rect" topic from my bag: [ankur@eng050194 20130405]$ rosbag info 20130405_navtest_0.bag path: 20130405_navtest_0.bag version: 2.0 duration: 58.8s start: Apr 05 2013 15:32:07.42 (1365136327.42) end: Apr 05 2013 15:33:06.25 (1365136386.25) size: 3.3 GB messages: 17410 compression: none [3286/3286 chunks] types: sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743] sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2] sensor_msgs/JointState [3066dcd76a6cfaef579bd0f34173e9fd] sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369] topics: /base_scan 1178 msgs : sensor_msgs/LaserScan /camera/depth_registered/image_rect 1626 msgs : sensor_msgs/Image /camera/rgb/image_rect_color 1658 msgs : sensor_msgs/Image /joint_states 5883 msgs : sensor_msgs/JointState /tilt_scan 1182 msgs : sensor_msgs/LaserScan /torso_lift_imu/data 5883 msgs : sensor_msgs/Imu [ankur@eng050194 20130405]$ I've written up a launch file as described in the tutorial [here](http://www.ros.org/wiki/rosbag/Tutorials/Exporting%20image%20and%20video%20data): However, when I run the launch file, it errors out: [ankur@eng050194 20130405]$ roslaunch exportImageData.launch ... logging to /home/ankur/.ros/log/c113647a-9feb-11e2-b9c4-24be051362b4/roslaunch-eng050194.eng.uts.edu.au-32061.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://eng050194.eng.uts.edu.au:60100/ SUMMARY ======== PARAMETERS * /rosdistro * /rosversion 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 [32095] process[extract-2]: started with pid [32096] [ INFO] [1365387639.215633458]: Initialized sec per frame to 0.100000 [ERROR] [1365387644.328011223]: Unable to convert 32FC1 image to bgr8 [ WARN] [1365387644.328120105]: Couldn't save image, no data! [ERROR] [1365387644.329480639]: Unable to convert 32FC1 image to bgr8 [ERROR] [1365387644.393881439]: Unable to convert 32FC1 image to bgr8 [ERROR] [1365387644.423329040]: Unable to convert 32FC1 image to bgr8 [ERROR] [1365387644.454279657]: Unable to convert 32FC1 image to bgr8 [ WARN] [1365387644.454386746]: Couldn't save image, no data! [ERROR] [1365387644.487755386]: Unable to convert 32FC1 image to bgr8 Would someone know what I'm doing wrong? I extracted the images of the "/camera/rgb/image_rect_color" topic just fine using this approach. Could be related: I can't view these images using rqt_bag either. Am I missing some package that provides this capability?

error: ‘bag’ does not name a type

$
0
0
I have added rosbag dependencies in cmakefile.txt and package.xml and included essential ros headers but still catkin_make shows errors ( this not name a type that not name a type). Please help i really dont understand whats going wrong. i have copied file from this ros tutorial : (http://wiki.ros.org/rosbag/Code%20API)

record kinect bag file, reconstruct disparity topic

$
0
0
Hi, I have followed following tutorial [0] to record Kinect data efficiently. It reconstructs the /camera/depth_registered/points topic properly but I also need the topic /camera/depth_registered/disparity. Is it possible to reconstruct this topic from the raw topics, or do I have to record it explicitly? Cheers, Oier [0] http://www.ros.org/wiki/openni_launch/Tutorials/BagRecordingPlayback

How to use rosbag to take a snapshot of topics ?

$
0
0
Hello everyone, I am trying to record a snapshot of topics when I used a button of my joypad. A naive approach consist to specify a topic trigger for rosbag record. I found something look good in the source code (github.com/ros/ros_comm/blob/groovy-devel/tools/rosbag/src/recorder.cpp) : if (options_.snapshot) { record_thread = boost::thread(boost::bind(&Recorder::doRecordSnapshotter, this)); // Subscribe to the snapshot trigger trigger_sub = nh.subscribe("snapshot_trigger", 100, boost::bind(&Recorder::snapshotTrigger, this, _1)); } but I don't understand how to use this option ! Maybe someone can help me or suggest another way to capture topics when I want ? Thanks best regards

image_transport rosbag issue

$
0
0
Has anyone else seen problems recording rosbags for all topics of a node using image_transport? > ERROR > [/tmp/buildd/ros-indigo-compressed-depth-image-transport-1.9.2-0trusty-20150729-0539/src/compressed_depth_publisher.cpp:223(CompressedDepthPublisher::publish) >> ... >> Compressed Depth Image Transport -Compression requires single-channel 32bit-floating point or 16bit raw depth images (input format is: bgr8). I see this with [pointgrey_camera_driver (tag 0.12.1)](https://github.com/ros-drivers/pointgrey_camera_driver.git) when doing a `rosbag record -a`. I've noticed some [issues](https://github.com/ros-drivers/axis_camera/issues/32) posted for other packages using image_transport so I thought I'd post a general question in the event there is some broader issue. UPDATE: Running `rosbag record -a -x "(.*)/compressed(.*)"` solves the issue of the errors by not recording the "compressed" topics but doesn't explain why they occur in the first place.

How to record bagfile within launch file

$
0
0
I would like to record some topics via launch file. This code runs without any errors, however, there is no recorded bagfile in current directory. Does anyone know the reason?

I cannot play a rosbag file for gmapping.

$
0
0
Hello. I'm installed ros-indigo in Ubuntu 14.04 (VMware). I tried "How to Build a Map Using Logged Data". http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData But, I did not play a rosbag file (basic_localization_stage.bag) completely. Generated map was a different map from “basic_localization_stage_ground_truth.png”. Below is commands and the error message: $ rosbag play ./basic_localization_stage.bag --clock $ rosparam set use_sim_time true $ rosrun gmapping slam_gmapping scan:=base_scan [ INFO] [1483110424.111356815, 124.700547870]: Laser is mounted upwards. -maxUrange 29.99 -maxUrange 29.99 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05 -srr 0.1 -srt 0.2 -str 0.1 -stt 0.2 -linearUpdate 1 -angularUpdate 0.5 -resampleThreshold 0.5 -xmin -100 -xmax 100 -ymin -100 -ymax 100 -delta 0.05 -particles 30 [ INFO] [1483110424.158217525, 124.745581898]: Initialization complete update frame 0 update ld=0 ad=0 Laser Pose= -19.396 -8.33452 -1.67552 m_count 0 Registering First Scan [ WARN] [1483110424.590366037, 125.179980513]: Detected jump back in time. Clearing TF buffer. ... [ WARN] [1483110457.960022078, 158.549614954]: Detected jump back in time. Clearing TF buffer. ---------- Others information (generated map, rqt_graph, ...) https://drive.google.com/open?id=1RvMWi9w0ey7r2Gv7k2RUx2tnvPJKj9vW2wef0zPdzgA I want to help this problem. Thanks in advance.

why the time stamp of the message is later than the rosbag time?

$
0
0
I'm debugging my code with rosbag replay. In my code, I did tf transform like this: tf.transformPose(target_frame, input_pose, output_pose); Sometimes, there's an exception thrown, which read: "Lookup would require extrapolation into the future. Requested time 1484037737.206813097 but the latest data is at time 1484037724.492085834, when looking up transform from frame [odom] to frame [map]" I checked in the debugger, and found the time stamp of the message input_pose is later than the rosbag time: p input_pose.stamp_ $1 sec = 1484037737, nsec = 206813097 p ros::Time::now() $2 sec = 1484037724, nsec = 918256570 Also, the rosbag play console shows: [PAUSED] Bag Time: 1484037724.967132 The commands I used to run the rosbag is rosbag play --clock --pause bagfile.bag And the param use_sim_time is already set to true: $rosparam get use_sim_time true Could anyone please help with this problem? Thanks!

Cannot parse rosbag in MATLab?

$
0
0
I just cannot parse this bag file. So far the matlab code just looks like filepath =fullfile(~/xxx.bag) bagselect =rosbag(filepath) the error on the second line is: "Expected a connection record header, but instead found Chunk. Cannot parse the file." I know the file isn't corrupted, I can read the point values in terminal. It's just LiDAR data off of a velodyne puck. it's not compressed, is 4GB just too big for it to read? There doesn't exist any documentation for errors this early on in the process, so I'm pretty much in the dark, any help would be appreciated. Thanks.

Error to open .ply file

$
0
0
Hi, I want to convert my rosbag file into ply file. I have velodyne data in rosbag file format that i can convert into pcd file with help of rosrun pcl_ros bag_to_pcd That gives me multiple pcd file that is converted in ply file using: pcl_pcd2ply input_file.pcd output_file.ply but conversion is not completed it gives error to open in MeshLab: While opening: '/home/nikka/Velo1.ply' Error encountered while loading file: "/home/nikka/Velo.ply" Error details: Unespected eof I am not getting what went wrong ? is the erro in bag2pcd or error in pcd2ply ??? can anyone plz help me with this...

problem with playing and displaying a bag file in rviz

$
0
0
I have a bag file containing the path my robot traversed using a laser sensor. This is the information of the bag file:> labcoro@Samsung:~/catkin_ws_youbot$ rosbag info planner_path1.bag path: planner_path1.bag version: 2.0 duration: 0.0s start: Dec 15 2016 12:06:09.53 (1481821569.53) end: Dec 15 2016 12:06:09.53 (1481821569.53) size: 48.4 KB messages: 2 compression: none [1/1 chunks] types: nav_msgs/Path [6227e2b7e9cce15051f669a5e197bbf7] topics: move_base_node/NavfnROS/plan 2 msgs : nav_msgs/Path I need to display the save data again in rviz but I do not know what the Fixed Frame of the bag is? I run these command sequentially: rosparam set use_sim_time true rosbag play --clock planner_path1.bag rosrun rviz rviz another problem is that the bag dose not play and it gives this message: [ INFO] [1484952163.366887588]: Opening planner_path1.bag Waiting 0.2 seconds after advertising topics... done. Hit space to toggle paused, or 's' to step. Any suggestion? Thanks.

Video file convert to .bag file

$
0
0
Hello! I want to convert my video file(.avi) to .bag file. Could you please help me? Thank you!

Rosbag step size

$
0
0
I have not been able to find out, but is it possible to increase the size of the step command `s` when rosbag is paused?

collecting and organizing rosbag files

$
0
0
Recording rosbag files is great. After multiple recording sessions, I'm left with all these bag files that are really only telling me date/time by direct observation. I can do rosbag info to get more details. I was wondering if anyone had a best practice for collecting, storing, and organizing rosbag files. I'm thinking of a database containing rosbag files with additional metadata including some text field for a description of what was recorded. Maybe this problem has already been solved. Thanks in advance.

memory mapping in ros bag

$
0
0
Instead of reading all the data from the ros bag file, is their any ros provided method to read the bag file using memory mapped methode? For example right now i am using below program to read the ros bag named obj.bag using memory mapped i/o, #include #include #include #include #include namespace bip = boost::interprocess; int main() { std::string filename = "obj.bag"; bip::file_mapping mapping(filename.c_str(), bip::read_only); bip::mapped_region mapped_rgn(mapping, bip::read_only); char const* const mmaped_data = static _cast(mapped_rgn.get_address()); std::size_t const mmap_size = mapped_rgn.get_size(); std::cout<

Why is Python rosbag crashing?

$
0
0
I'm trying to read a ROS bag file to convert it's values. I'm using the rosbag Python API. I don't understand why the reading crashes at the end: -0.262920607691 0.447809595374 -0.39638550589 -3.14159265357 0.726601225435 -2.87867204592 -0.265034838048 0.436386356356 -0.412905936714 -3.14159265357 0.721504033644 -2.87655781556 Traceback (most recent call last): File "rosbag_read_write.py", line 20, in for topic, msg, t in bag.read_messages(topics=['/joint_states']): File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/bag.py", line 2329, in read_messages yield self.seek_and_read_message_data_record((entry.chunk_pos, entry.offset), raw) File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/bag.py", line 2459, in seek_and_read_message_data_record raise ROSBagFormatException('Expecting OP_MSG_DATA, got %d' % op) rosbag.bag.ROSBagFormatException: Expecting OP_MSG_DATA, got 6 Here is my script: import sys import rosbag from ttk import * from Tkinter import Tk from tkFileDialog import askopenfilename from tkFileDialog import asksaveasfile Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing filename = askopenfilename(filetypes = ( ("ROS bag", "*.bag"),("All files", "*.*") ) ) print(filename) bag = rosbag.Bag(filename) topics = bag.get_type_and_topic_info()[1].keys() types = [] for i in range(0,len(bag.get_type_and_topic_info()[1].values())): types.append(bag.get_type_and_topic_info()[1].values()[i][0]) print types for topic, msg, t in bag.read_messages(topics=['/joint_states']): print msg.position[0], msg.position[1], msg.position[2], msg.position[3], msg.position[4], msg.position[5] bag.close()

pointcloud data full copy

$
0
0
Hello! I am using rplidar with SLAM. I recorded data using rosbag. Using this, I can check the recorded data. & rosrun rplidar_ros rplidarNodeClient & rosbag play XX-XX-XX-XX-XX-XX.bag When new data is coming up, the previous data going to deleted. Do you know how to get the full data? Please help..

Store ROS messages in file ?

$
0
0
Hello I am working on Some project, I have to store ROS messages in some File using C++ API's. I knew ROS BAG files which is excellent for storing ROS messages But i want to knew Is their any other supported files in ROS to store ROS message using C++ API's. If yes then which one is it ? Can anyone Suggest. Can I read ROS .bag file in Reverse order ? If yes then how it can be done. Please can anyone tell me. image:![IMAGE !](/home/vikram/opencv-3.1.0/samples/winrt/FaceDetection/FaceDetection/Assets/group1.jpg "title")

"rosbag play" pauses while it shouldn't

$
0
0
Are these expected behavior of rosbag? **Behavior-1** $ wget http://download.ros.org/data/rosbag/clock_alive.bag $ rosbag info clock_alive.bag path: clock_alive.bag version: 2.0 duration: 40.0s start: Jun 03 2015 05:27:52.30 (1433334472.30) end: Jun 03 2015 05:28:32.29 (1433334512.29) size: 14.5 MB messages: 40000 compression: bz2 [40000/40000 chunks; 0.01%] uncompressed: 55.9 GB @ 1.4 GB/s compressed: 5.7 MB @ 145.5 KB/s (0.01%) types: std_msgs/String [992ce8a1687cec8c8bd883ec73ca41d1] topics: /blabla 40000 msgs : std_msgs/String $ rosbag play -l --clock clock_alive.bag [RUNNING] Bag Time: 1433334474.755216 Duration: 2.453124 / 39.990000 The time elapses as expected. Then on another terminal, $ rostopic hz /blabla subscribed to [/blabla] WARNING: may be using simulated time average rate: 0.000 min: 0.000s max: 0.000s std dev: 0.00000s window: 59 no new messages no new messages no new messages no new messages no new messages no new messages Issues are 1) the topic `/blabla` is being published throughout the entire bag file as you see the screenshot from rqt_bag below, but `rostopic` is capturing only occasionally as above, 2) `Bag time` pauses elapsing. Once `rostopic` command gets terminated it resumes without jump (i.e. Bag time was paused). **Behavior-2** Then setting false to `/use_sim_time`, term-1$ rosbag play clock_alive.bag term-2$ rostopic hz /blabla subscribed to [/blabla] average rate: 804.263 min: 0.001s max: 0.005s std dev: 0.00109s window: 12 average rate: 22.330 min: 0.001s max: 1.040s std dev: 0.18831s window: 35 average rate: 26.260 min: 0.001s max: 1.040s std dev: 0.15480s window: 59 average rate: 19.355 min: 0.001s max: 1.040s std dev: 0.19223s window: 63 average rate: 24.224 min: 0.001s max: 1.040s std dev: 0.16041s window: 106 average rate: 30.743 min: 0.001s max: 1.040s std dev: 0.14531s window: 165 This time it looks much like as expected. But still "Bag time" pauses while rostopic runs. Particularly in my case, I'm writing tests using .bag files so `use_sim_time` is really in need. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty $ more /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz stepping : 3 microcode : 0x17 cpu MHz : 3356.250 cache size : 6144 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4
Viewing all 475 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>