IE-482-582 / fall2019

Course materials for the Fall 2019 semester of IE 482/582
8 stars 6 forks source link

Unable to have my edits to sample_racetrack.csv show up in gazebo #12

Open bengreatrix opened 5 years ago

bengreatrix commented 5 years ago

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.

cmurray3 commented 5 years ago

Steps for creating a custom maze world

https://github.com/IE-482-582/fall2018/tree/master/world_demo#2-creating-a-custom-maze-world

Steps for creating additional worlds

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).


  1. 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
  2. Edit the sample_racetrack.xls file in Libre Office Calc.

  3. Save as sample_racetrack.csv (export as .csv file):

    • File --> Save As...
    • Choose file type = "Text CSC (.csv)"
    • Name the file "sample_racetrack.csv"
    • Save
  4. 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
  5. 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
  6. 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
  7. Open new_world_demo.launch in a text editor

    • Replace world_demo.world with new_world_demo.world.
    • Save the .launch file.
  8. Test out your new world:

    
    cd ~/catkin_ws/src/world_demo/scripts
    roslaunch world_demo new_world_demo.launch