I recorded the data in rosbag file of /tf and /scan topics and when i run the gmapping and playback the recorded data from rosbag file nothing changes. And the error is 100% messages dropped.Do i have to record different topic and do i need to do something in the tf topic or not. The scan noe is created by depthimage_to_laserscan and the /scan node is working but the map is not building whats the error. I have implemented same method in gazebo and its working but with p3dx its not working. I have followed from the book programming robots with ros.
↧
How to create 2Dmap with p3dx with rosbag?
↧
Convert legacy logs to ROS bag
Is there a way to convert legacy logs to ROS bags?
I have a set of sensors logs that were recorded before my project started using ROS. I am now converting everything to use ROS, but I still want to use my old logs for replay purposes. I have already written code that converts those old logs to ROS messages (which conveniently also serves as the direct interface to the sensor). Now I'm trying to replay the old logs, using simulated time. There are several sensor-logs that need to by synchronized. From what I've read, if these were originally created as ROS bags, this would not be an issue.
The solution as I see it is to either convert the existing logs to ROS bags, or find a way to control the simulation time of the roscore without ROS bags or gazebo.
↧
↧
Rosbagging MoveIt! Best practise
Hi Everybody
Every once in a while I see some strange movements executed by our robots (mitsubishi, fanuc, ... - industrial 6-axis). Since execution has continued already it's of course difficult to debug this. I would like to be able to record both what I *told* the robot to do and what it then *did*.
I think rosbagging /joint_path_command and /joint states should do the trick. How do I play back those? I would like to see them visualized in rviz
Does anybody do this? Got some code to share?
Thanks a lot
Simon
↧
record kinect data
hello
i have question about record kinect data.
when i record kinect data, i write command line
rosbag record /odom /camera/rgb/image_rect_color camera/depth_registered/image_raw /camera/rgb/camera_info /tf -O kinect
record is ok. but bag file is large. (5min record --> more 10GB)
but your bag file is smaller than my file.
For this demo, you will need the ROS bag demo_mapping.bag (295 MB, fixed camera TF 2016/06/28).
https://docs.google.com/uc?id=0B46akLGdg-uadXhLeURiMTBQU28&export=download
could u teach me how to write command line for record data.
↧
How to create .bag files from .clf files having laser and odometry data???
Is there any generalized code for converting any .clf file to .bag format??????I was trying the same code for 'aces.clf' file, but it was giving IO error.
↧
↧
How to choose a fixed location for created bag files ?
Hey guys,
I am creating a rqt plugin at the moment in Python and I am working with bag files.
In the rqt plugin I create new bag files with rosbag.Bag("file_name", "w") and close them later.
Everything works fine but my bag files are always saved in the folder from where I started rqt in console.
Is it possible to choose a fixed folder for this?
I tried to find an answer in older questions but couldn't so I apologize if the question was already asked.
Thank you very much in advance!
Best regards
↧
Has there been progress for URDF transform jitter in RVIZ?
From my [ros-users post](https://code.ros.org/lurker/message/20101217.042334.a4610002.gl.html):
*So I have been following the really nice (R2D2) tutorials on URDF, thanks a
lot for those! I've managed to get our robot model into RVIZ and follow
base_link, but the transforms on the URDF besides base_link all seem to time
lag, causing some jittery looking motion:*
*[http://www.youtube.com/watch?v=GiQUc8FG6m8](http://www.youtube.com/watch?v=GiQUc8FG6m8)*
*We originally noticed that the static TFs defaulted publishing
from joint_state_publisher at 10Hz, so we set it to 100Hz. This upped the
maximum rate published to that of our base_link (~50Hz from our odom
source), but this is what you see in the video.*
*The model does not jitter in RVIZ if the target and fixed frame are set to
base_link, but does jitter when fixed frame is odom. We are playing data from a recorded bag file using --clock and have set
use_sim_time to true.
I've attached a copy of the xacro file I use to generate our urdf in case
I've made a mistake in there.*
*Thanks,*
*- Chad*
It would be nice to have the links update and move [synchronously for the robot model](https://code.ros.org/lurker/message/20101217.183439.eef0c0fd.gl.html). Is this something that should have a ticket made? Are there other solutions than editing the [timestamps in the bagfile](https://code.ros.org/lurker/message/20101217.090809.0e2f24f8.gl.html)?
↧
How do I convert csv format to rosbag?
Hello there,
I am working on this project which expects me to run SLAM on ROS using any filter of my choice. I have decided to choose gmapping SLAM. I am provided with two datasets from Rawseeds.org, namely Odometry and Laser sensor datasets in csv file format. As far as I know, I think I need to create a rosbag file for entering these two datasets to my node as inputs. If I am not wrong, please help me regarding how to change the csv files into rosbag format and if I am mistaken, please guide me how to go ahead with using these csv files to map using gmapping. Thank You in advance.
↧
Hector Mapping working with bag file but not LIVE?
I am currently working on an autonomous robot that requires me to build a map and navigate it. I can get a map built using the tutorial.launch file within the hector_slam_launch package, but I can't seem to get it to work in a live setting. I can record a bag file, start doing stuff (notice that it is not building a map at this point), stop recording, and play back the file and it will build the map. Am I missing something here? I understand that this might be an issue with the clock as I use the "--clock" argument to record the bag file. I'd really appreciate any help I can get because I need to resolve this quickly.
Using:
RPLIDAR A1 and Turtlebot (Create version) -> for testing purposes
Thanks.
↧
↧
Convert carmen log file to rosbag
Hi, I am new to ros and I am trying to convert a carmen log file to a bag file. I can parse the file but I don't know how to put the values of the carmen file in the bag. I think that I have to put the ODOM in the tfMessage and the ROBOTLASER1 in the laserScan type but I don't know how to map the values, can someone help?
↧
How do you convert from a csv to a bag file in ROS?
I see a lot of things for going from bag to csv, but does anyone know how to go from csv to bag? I am running gmapping but data files in the csv format need to be bag files for gmapping to work.
↧
Store Published Image into cv2.VideoCapture()-Like Object
Folks,
How can I store published images into a video-like OpenCV object, without having to create a video file (e.g. .mp4) first?
Does not have to be a VideoCapture() object, but just any object that stores all the frames (I don't think a vector/list is what I'm looking for, but an actual OpenCV object...if possible, of course).
I'm trying to use a program called bag2video.py to do this as well, but I don't fully understand how the program actually works.
↧
rosbag Image Decompression With API
Folks,
My rosbags all have compressed image topics ONLY. I want to grab the images from my rosbag and decompressed them through the rosbag API (or through code, in general).
I believe that should be a fast method compered to playing the rosbag and subscribing to the image topics??? If I am not correct about this, then tell me, and I'll just play each rosbag, and decompress images the old ROS fashion way (I have 1600 rosbags, 8 seconds long each)
↧
↧
rosbag play --clock
I record a data.bag using Hokuyo Laser.
Then, i use the commad: rosparam set use_sim_time true; rosrun gmapping slam_gmapping scan:=scan
After that, rosbag play --clock data.bag
Using rosbag info , i obtain
thiem@thiem-K42JY:~/catkin_ws$ rosbag info data.bag
path: data.bag
version: 2.0
duration: 2:48s (168s)
start: Dec 08 2016 09:06:14.93 (1481184374.93)
end: Dec 08 2016 09:09:03.80 (1481184543.80)
size: 59.2 MB
messages: 25319
compression: none [79/79 chunks]
types: sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
topics: /scan 6743 msgs : sensor_msgs/LaserScan
/tf 18576 msgs : tf2_msgs/TFMessage (2 connections)
But, there is a problem: slam_gmapping dose not print out diagnostic information. So, I can not create a map
Please, help me and show me how can i fix it
↧
Display CompressedDepth Image Python cv2
Folks,
What is the correct way to subscribe to a CompressDepth (32FC1, plus, no regular depth image available) image and display (e.g., cv2.imshow) in Python? I can do this easily in roscpp, but I get an empty array rospy, even if I use something like:
depth_image = cv_bridge.CvBridge().compressed_imgmsg_to_cv2(msg)
Or
depth_image = np.array(cv_bridge.CvBridge().compressed_imgmsg_to_cv2(msg))
And even:
np_arr = np.fromstring(msg.data, np.uint8)
image_np = cv2.imdecode(np_arr, cv2.CV_LOAD_IMAGE_UNCHANGED)
Nothing works
↧
reading large rosbag
Hello i have a rosbag of 300 mb which contains the pattern of an object for object recognition purpose. My problem is that when i read it, it takes too long time to read it. Is their any other methods which i can use for storing large collection of data or map and than read it very fast?
Is their any way i can access the rosbag datas, numbers with their index or something directly without having to read the hole data first? Cas the size of rosbag can also reach 1gb if object has large surface.
↧
How do I parse rostopics from a ros bag in C++?
I want to write a node that would parse a ros topic given as the input argument and display the message published by it.
Can you please give me leads to point to existing examples that I could look into?
↧
↧
rosbag, unable to create a map
I have another problem that need your help,
I built a data.bag using rosbag
terminal 1: turn on rosaria
terminal 2: using keyboard to drive a robot
terminal 3: turn on hokuyo_scan
terminal 4: turn on tf between hokuyo_scan and base_link
terminal 5: rosparam use_sim_time true
termial 6: rosbag record -O data.bag /scan /tf
, but when i use rosrun gmapping slam.. and rosbag play and rosrun map_sever map_saver. I do not create a map.
Please, show me how can i fix it.
Thanks you advance in your help
↧
ROS bag synchronization problem with laser scan messages
I have a raw csv data sequence of laser scans and odometry data. Here are a few data samples:
Laser scans:
25 1205853395.41 181 0.5429999828338623 0.5389999747276306 ...
26 1205853395.51 181 0.5450000166893005 0.5429999828338623 ...
27 1205853395.62 181 0.5450000166893005 0.5350000262260437 ...
28 1205853395.73 181 0.5400000214576721 0.5400000214576721 ...
29 1205853395.83 181 0.5479999780654907 0.5360000133514404 ...
Odometry:
901 1205853437.119040 0 -3.102520660503609 3.963312253867039 1.153641139388319 ...
902 1205853437.163038 0 -3.102512280308661 3.963330776419583 1.138202487770184 ...
903 1205853437.211029 0 -3.102511007946354 3.963333473265386 1.121727579355471 ...
904 1205853437.263017 0 -3.102505770651651 3.963344116867601 1.105313585686352 ...
In these data samples, the first column refers to the id for the data samples. the second column refers to the time stamp, in seconds.
I am trying to write a ROS-bag file that contains these data samples, and play the bag file, and use AMCL to do localization. The way I currently generate the ROS-bag file is by iterating through all data samples, and write a message (either LaserScan, or Odometry) for each data sample to the appropriate topics, with the timestamp directly obtained from these data samples.
The problem I observed is that, while playing the ROS-bag file, with AMCL running, the localization was pretty bad - the laser scan readings shown in RVIZ completely misaligned with the obstacles in the map, after 5 seconds or so.
After some investigation, I found that the source of the problem could be due to the time stamps written to the bag file. It appears that the time stamps that these messages are published are different from the time stamps when they were written to the bag file. Furthermore, the difference between laser messages' **"published time stamp"** and **"true time stamp"** is way larger than that for the odom messages, by around 5-7 seconds.
For example, for laser scan message with id=27, the publish time is 1205853412.16, but the *true time* for this message, as shown above, is 1205853395.62. On the other hand, for odometry message with id=902, the publish time is 1205853437.163038015, and the true time is 1205853437.163038, as shown above.
I believe that it's because of such difference in the delay caused the synchronization problem.
Although this phenomenon seems reasonable, because the LaserScan message is larger than Odometry due to the "ranges" array, it is something very undesirable. I haven't come up with a way to deal with this effectively. Has anyone encountered this issue before, or know something about how to resolve this? I really appreciate your help!
EDIT: 5-7 seconds should be over 10 seconds.
↧
How to pass topic names as input argument in the command line terminal?
Hello !
I have a problem that states "Read a rosbag, to parse a topic, that is passed as an input argument"
How do I pass the input argument using "rosrun" in the command line terminal?
My code snippet:
#include
#include i
#include
using namespace std;
void topicCallBack(const sensor_msgs::PointCloud2::ConstPtr&msg)
{
cout<<"Reading message of type PointCloud2\n"<header;
if(msg->width)
cout<< "\nInpoint Cloud\nwidth is"<width;
//THIS LINE WILL NOT WORK AS MSG IS OF TYPE POINT CLOUD
if(msg->transforms.transform.translation)
cout<< " reading message of type TF\n";
}
int main(int argc, char **argv)
{
ros::init(argc, argv,"parser");
ros::NodeHandle nh;
//intializing the subscriber
ros::Subscriber sub = nh.subscribe("/camera/depth/points",1000, topicCallBack);
ros::spin();
return 0;
}
Here I have given my topic name as "/camera/depth/points" which publishes the message of type sensor_msgs/PointCloud2. But in my command line terminal, if I pass the topic name as "/tf", how do I ask it to publish the message of type tf/tfMessage because the subscriber is of type PointCloud2?
In total, I have three topics that publish messages of type PointCloud2, tf, odom messages. But I am not able to see, how to pass different topic names in the command line argument and publish the respective message type
Thanks!
↧