ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to record robot odometry in multiple bagfiles after resetting the robot's computer without resetting its odometry and timestamps?

asked 2018-08-29 13:16:09 -0500

JKaiser gravatar image

I'm running the nodes rosaria, rosaria_client , hokuyo node and avt_vimba camera to record some datasets of routes around campus roads with rosbag in a Pioneer 3AT robot. The robot runs Ubuntu 14.04 with kernel 4.4.0 and ROS Indigo.

I have managed to record 3 out of 5 datasets without much trouble. However, the last 2 are giving me trouble as the robot's power runs out before finishing them due to the routes being too long. Initially, I thought the batteries were defective, and while that was the case, after changing the batteries, the robot's power still runs out before it can finish any of the routes left.

The solution my teacher and I came with was to record the datasets in multiple files. However, that would require to save a bagfile until the robot's power is about to run out, shut down the robot, change its batteries for some spares (we have them) and restart the recording from the spot the robot stopped, and that will invariably reset the odometry and timestamps of the recorded messages. Is there a way to resume that recording while keeping the last recorded odometry and timestamps? If so, how? If not, then is there a workaround?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-06 11:33:45 -0500

ReedHedges gravatar image

updated 2018-12-06 11:37:55 -0500

Hello, been a while since I checked ROS Answers, but here are some additional ideas:

  • It may be possible to "hot-swap" the batteries without shutting it down, if two (discharged) batteries are able to continue powering all the equipment on the robot. Just replace them one at a time. If using multiple sets of batteries, it's generally a good idea to keep them in "matched" sets. If you're buying new batteries it is now possible to get slighly higher capacity SLA batteries in that form factor; we switched from 7Ah to 9Ah batteries starting a few years ago. There might be higher capacity ones also available now.
  • The skid-steer P3AT with its very wide high friction tires is not very efficient when turning. You can replace the wheels with other wheels (but you need to change firmware calibration and ARIA parameters), or just cover the wheels with some tape with less friction. Or drive the robot on sand or dirt (which is it's original design intention.) I used to keep a bucket of sand and sometimes put it on the pavement in the area I was using a P3AT.
  • I don't know about offsetting timestamps. Maybe there is a tool somewhere that can process the contents of the later bagfiles and do this? There is a function in the ARIA library for applying an offset to the odometric pose I don't recall exactly how rosaria will handle that, and there isn't a rosaria interface for it, but you could add it. The ARIA method is ArRobot::moveTo()). If there is a standard or typical ROS command for this kind of thing, it should be used. Connect with the rosaria project on github to discuss. There is a robot firmware command (SETO) to reset odometry to 0,0,0 but there isn't one to initialize it to any arbitrary pose. (The MobileSim simulator has one, but not the P3AT robot firmware.)
edit flag offensive delete link more

Comments

Hi ReedHedges, it may be a little late but the first point in your answer worked but it also was related with your 3rd point. I got around offsetting data by saving the very last data before a shutdown and using it to offset the new data for the secong bagfile. I didn't know about the second point.

JKaiser gravatar image JKaiser  ( 2019-01-10 15:16:25 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-29 13:16:09 -0500

Seen: 252 times

Last updated: Dec 06 '18