Open bengreatrix opened 5 years ago
https://github.com/IE-482-582/fall2018/tree/master/world_demo#2-creating-a-custom-maze-world
These instructions assume you have already followed the above steps to create world_demo.world
and world_demo.launch
. Now, let's create an additional world (without losing world_demo.world
or world_demo.launch
).
Make backups of your existing sample_racetrack.xls
and sample_racetrack.csv
files. You might want to use them again.
cd ~/catkin_ws/src/world_demo/scripts
cp sample_racetrack.xls sample_racetrack_backup.xls
mv sample_racetrack.csv sample_racetrack_backup.csv
Edit the sample_racetrack.xls
file in Libre Office Calc.
Save as sample_racetrack.csv
(export as .csv
file):
Run the python script to generate a course_ubusername.world
file. This python script always imports a file named sample_racetrack.csv
.
cd ~/catkin_ws/src/world_demo/scripts
python create_world.py
Rename the course_ubusername.world
file to be new_world_demo.world
:
cd ~/catkin_ws/src/world_demo/scripts
mv course_ubusername.world new_world_demo.world
Copy the world_demo.launch
file to a file called new_world_demo.launch
:
cd ~/catkin_ws/src/world_demo/scripts
cp world_demo.launch new_world_demo.launch
Open new_world_demo.launch
in a text editor
world_demo.world
with new_world_demo.world
..launch
file.Test out your new world:
cd ~/catkin_ws/src/world_demo/scripts
roslaunch world_demo new_world_demo.launch
So I edited the sample racetrack and saved over the old .csv file. I ran the same code:
cd ~/catkin_ws/src/world_demo/scripts roslaunch world_demo world_demo.launch
hoping that the track would now be what I changed it to but it is the same track doesn't change. Does anyone know how to fix this? Do I have to create a new .world file? Is there a chance that the old csv files is somewhere in my downloads and ROS keeps pulling that by mistake? should I save my new track under a different name and edit my code to call that one? That would seem like an annoying process go through each time I want a new track. Any ideas are appreciated.