ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Sat, 12 Sep 2020 05:28:25 -0500Best practice to extract recorded data from ros2 bag dumps?https://answers.ros.org/question/361453/best-practice-to-extract-recorded-data-from-ros2-bag-dumps/Currently I am working on my university project with ROS2 with a small model car. I am implementing and debugging a local planner module. For my documentation I want to plot the driven path and generated trajectories (e.g. with `matplotlib`).
I have both in ROS2 messages which I dumped via `ros2 bag ...` to a sqlite database binary.
I was googling a lot and found https://github.com/eurogroep/rosbag_pandas which relies on ROS1 python bindings. Is it possible to open my sq3 file with this library? Do I have to install `melodic` along my current `dashing`?
Is there a way to convert/export the messages to a non--binary format like csv (where the messages are already deserialized)?
Thank you for your advice and clarifying my confusion in my head.
TLDR;
How to use `ros2 bag` dump data in other tools?
kopytjukSat, 12 Sep 2020 05:28:25 -0500https://answers.ros.org/question/361453/offline caching of data in roshttps://answers.ros.org/question/350934/offline-caching-of-data-in-ros/hello everyone,
Im using rosbridge as websocket , i want to store data which gets lost when machine is offline without using rosbag .
im using rpi4 kinetic ,
suppose i have imu data which publishes data frequently, suddenly internet went off for a minute my web will show recent online data when internet restored , i want to store whatever missing data happend in that seconds into local file or buffer it then display
similar as https://aws.amazon.com/blogs/opensource/robomaker-cloudwatch-ros-nodes-offline-support/
though im not using aws robomaker , i want to do it in rosbridge or any other websocket way
thanking youkallivalliWed, 29 Apr 2020 03:54:52 -0500https://answers.ros.org/question/350934/Tools for rosbag analysis - Others that are used?https://answers.ros.org/question/91511/tools-for-rosbag-analysis-others-that-are-used/What tools have people developed and use for rosbag analysis?
I know of rqt_bag (which is an absolutely awesome tool), which allows you to browse the topics in a concise timeline, and using that in conjunction with rqt_plot to plot data. However, it's still a little cumbersome to extract data for more detailed analysis.
I've created a small package using numpy that will parse a rosbag given a set of topic paths (consisting of fields and optionally indices, much like extracting data for plotting) and return simple multi-variable data sets for ease of plotting and analysis, which includes interpolating data sets so that they are on a time scale (with the same spacing). This allows basic errors to be computed. If you also published the same data, you can use this to potentially see delays between the different publishers.
You can always run the conversion, then save the final datasets to Matlab to plot and examine as well. Really easy to do in Spyder.
Will upload the package in a bit.
EDIT:
Googled and saw Pandas from this presentation: https://speakerdeck.com/nzjrs/managing-complex-experiments-automation-and-analysis-using-robot-operating-system
Looks interesting, will start looking at this.eacousineauWed, 16 Oct 2013 06:08:34 -0500https://answers.ros.org/question/91511/Real time data analysis, any tools or package inside ROS?https://answers.ros.org/question/62157/real-time-data-analysis-any-tools-or-package-inside-ros/Hello
Im wondering is there any tools or some packages inside ROS that permit real-time data analysis. I have used ROS in our mobile device , but I need to perform some online (real-time) analysis of the datas provided by my ROS nodes. Like speed profiles, distances to some object or obstacles , would like to be collected in long period of time, stored in some location and than in real-time (on-line) make them available for analysis. Is there any help inside ROS or do I need some additional Hardware and Software outside ROS??
Any help or comment would be welcome
ThanksAstronautSun, 05 May 2013 19:54:47 -0500https://answers.ros.org/question/62157/How to do a frequency analysis of some velocity profiles?https://answers.ros.org/question/45363/how-to-do-a-frequency-analysis-of-some-velocity-profiles/Hello
I have some question regarding analysing some post-processing data. I have extracted a linear and angular velocity of the robot moving around. The velocity is coming from AMCL and angular velocity is calculating with the help of IMU unit (just use the position/orientation) and AMCL as well. I made different bag files( so different robot runs) and I have significant peeks (noises) in both profiles( in linear velocity not so much noises bit the angular velocity have significant noises). So thought a frequency analysis of the velocity profiles might reveal more high components in both velocity profiles. But dont know exactly how to do it? Also where this noises can come from??
Im posting one of my profiles. Angular speed![image description](/upfiles/13497592397078362.jpg)
And the linear one!!![image description](/upfiles/13497592156603107.jpg)
This IS the code for the speed calculation
void speedCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
btScalar r,p,y;
btQuaternion q(msg->pose.pose.orientation.x,msg->pose.pose.orientation.y,msg->pose.pose.orientation.z,msg->pose.pose.orientation.w);
btMatrix3x3(q).getEulerYPR(y,p,r);
std_msgs::Float64 yaw;
yaw.data = y;
if (count2 == 0){
time_prev = ros::Time::now().toSec();
count2=1;
}
double time_now = ros::Time::now().toSec();
double curr_theta = yaw.data;
double curr_x = msg->pose.pose.position.x;
double curr_y = msg->pose.pose.position.y;
if (curr_x < 0){
curr_x = curr_x * -1;
}
if (curr_y < 0){
curr_y = curr_y * -1;
}
double time_dif = time_now - time_prev;
if (prev_x != 0 || prev_y != 0){
if (time_dif != 0){
double dist_theta = (curr_theta - prev_theta);
if (dist_theta < 0){
dist_theta = dist_theta * -1;
}
double dist_x = (curr_x - prev_x);
if (dist_x < 0){
dist_x = dist_x * -1;
}
double dist_y = (curr_y - prev_y);
if (dist_y < 0){
dist_y = dist_y * -1;
}
double dist_tot = sqrt((dist_x * dist_x) + (dist_y * dist_y));// * 10;
double speed = (dist_tot / time_dif);// * 3.6;
double speed_theta = dist_theta /time_dif;
if (speed < 0.12){
speed = 0;
zero_count++;
}
if (speed_theta < 0.07){
speed_theta = 0;
}
ROS_INFO("linear speed= %f, anglular speed= %f", speed, speed_theta);
myfile << speed << " " << speed_theta << "\n";
speed_count++;
speed_sum = speed_sum + speed;
speed_sum_theta = speed_sum_theta + speed_theta;
if (speed_count == 20){
speed = speed_sum / speed_count;
speed_theta = speed_sum_theta / speed_count;
if (zero_count > 7){
speed = 0;
}
speed_count = 0;
speed_sum = 0;
speed_sum_theta = 0;
zero_count = 0;
count = count + 1;
}
}
}
prev_theta = curr_theta;
prev_x = curr_x;
prev_y = curr_y;
time_prev = time_now;
}
Frames.pdf AstronautMon, 08 Oct 2012 17:05:57 -0500https://answers.ros.org/question/45363/