This repo contains docker module that automatically change .bag
data into .csv
by running (1) rosbag play (2) converter harness. This is designed for non-computer scientists and roboticists so that people can easily run in a single shot.
- Mingi Jeong
- Alberto Quattrini Li
.
├── bagfile
├── docker-compose.yml
├── Dockerfile
├── images
├── LICENSE
├── novnc.env
├── ros.env
└── workspace
└── src
├── time_sync_bag_to_csv
└── ysi_exo
Before following the next two steps, install Docker (installation instructions for Mac or for Windows).
Open a new terminal in the Mac or PowerShell in Windows.
- Once the terminal is open, clone this repository with the command
git clone https://github.com/dartmouthrobotics/vnc-ros-sonde-docker.git
- Enter in the cloned repository folder,
cd vnc-ros-sonde-docker
- Run
git submodule init
(only first time) - Run
git submodule update --recursive
(only first time) - Run
docker-compose build
(ros.env
contains environment variables for ROS that can be modified before running the command in step 3. No need to change it for biologists)
Once the other terminal shows the following type of messages
Starting mac-ros_novnc_1 ... done
Starting mac-ros_ros_1 ... done
On the same terminal you built,
- Run
docker-compose up
open another terminal: - Run
docker-compose exec ros bash
(docker-compose up
has to be running) - On the same terminal, run
source /opt/ros/melodic/setup.bash
- Run
find /root/catkin_ws/src -type f -exec dos2unix '{}' '+'
(only first time) cd /root/catkin_ws
andcatkin_make
source /devel/setup.bash
cd /root/catkin_ws/src/time_sync_bag_to_csv/nodes
chmod +x convert_harness
andchmod +x csv_converter
-
copy one bag file into
bagfile
folder insidevnc-ros-sonde-docker
. -
vnc-ros-sonde-docker
-->workspace
-->src
-->time_sync_bag_to_csv
-->param
--> change the information- update the
bag_file_name
to be convereted - update
sonar
true or false according to the usage of Catabot2, Catabot3 or box
- update the
-
On the same terminal, run
roslaunch time_sync_bag_to_csv harness.launch
and you should see a number of messages, including[INFO] data saving! file location
. As long as the time is ticking, it is going on. The conversion takes the same amount of the deployment.
-
In the terminal open for step 2., press ctrl+c, which will stop the execution of the simulator. Once that is stopped -- you should see it as the terminal can accept commands -- press ctrl+d to exit the Docker container.
-
Afterwards, in the terminal open for step 1., press ctrl+c. Once terminated, you should see the following messages
Stopping mac-ros_ros_1 ... done Stopping mac-ros_novnc_1 ... done
-
Run
docker-compose down
(Make sure you are insidevnc-ros-sonde-docker
before doing this)
At this point, both terminals can be closed if you wish.
- copy bag file to
bagfile
folder docker-compose up
as per step 2docker-compose exec ros bash
as per step 2- source workspace bash as per step 2.
- roslaunch as per step 3.
The workspace folder that gets created on your machine by docker-compose
is where you can write and edit your packages. It maps to ~/catkin_ws
on the Docker container. However, if you want to run catkin_make
, do so by creating a bash via docker-compose exec ros bash
and running catkin_make
in /catkin_ws
.
Edit the Dockerfile
line that installs packages and rebuild the container using docker-compose build
.
- multiple bags