Project introduction: Add your name to the credits - WARRExploration/rover_sim GitHub Wiki

To make sure that you know your way around the project structure, are able to launch the simulation with the latest updates by other team members, and are able to add your own updates, please add your name to the credits inside the simulation. For experienced coders this task should take about 10 minutes.

If you have problems, or questions about, setting up your development environment, getting the simulation to run, finding the correct changes to make in the code, pushing your changes to other team members, or anything else, don't hesitate to ask your team members, we are happy to help.


To test our rover location, movement and planning algorithms, we have created a 3D environment and robot model in the simulation software Gazebo. We are using RViz (a visualization tool in ROS) to collect data like camera streams or motor positions from Gazebo (and later the real-world rover), and to plan which actions the rover should undertake. We communicate between the programs using ROS topics (do the ROS tutorial for info about those). Ros_control allows us to seamlessly swap out the Gazebo simulation for the real hardware in the end.

On our rover and on our personal development computers, we are working inside a big Catkin Workspace. In there we put the rover subsystems, which correspond to the GitHub repositories, in seperate folders inside the src directory, e.g. workspace/src/rover_sim. These folders act as ROS packages, so we can use the ROS command roslaunch to start the simulation or other subsystems. This wiki contains helpful links and more information if you want to understand further how all these programs work together.

Please set up your Catkin workspace on a Ubuntu computer or virtual machine, if you haven't already done so. Make sure that the rover_sim and Rover_II repositories are present. Pull in the latest changes by navigating to each repository inside the src folder, and from there running git pull

All changes we make during this tutorial are inside rover_sim, so please navigate there. As of 2019-04-14, you will see the following folder structure:

rover_sim
L CMakeLists.txt  # required for ROS/Catkin
L package.xml     # required for ROS/Catkin, ROS-package description
L README.md       # readme information file, please read it
L launch
  L simulation_joy.launch    # the gazebo launch file we will be using, named joy because it works with joysticks,
                             # specifies which programs and ros nodes to start
L models     # common models used by several worlds, e.g.
  L landmarks     # boxes with qr codes which we will be able to use at the competition, and
  L names         # where the model you will create with your name will be added.
             # the models in here should have a special Gazebo-importable format, e.g.
    landmarks
    L L4     # model name
      L model.config
      L model.sdf      # the actual model file, often referencing further files in subfolders, like
      L meshes
          L mesh.dae        # the visual model, a cube, Collada 3D object file
          L collision_mesh.dae    # the optional simplified collision model, also a cube
      L textures
         L texture.png   
L providedFiles        # resources like the height map provided by the ERC competition
L scripts                    # (python) scripts to generate various objects we need for the simulation, e.g.
  L generate_landmarks.py         # creates the 3d model of all the qr tag markers at correct positions
                                  # of a given heightmap 
  L generate_single_landmark.py   # called by generate_landmarks, creates a single model, e.g. L4

  L generate_names.py     # you will run this script to create a model
                          # with a texture of your name in models/names/
                          # which will then be included in the simulation
  L generate_gazebo_model.py      # creates the Gazebo-importable model, used by generate_names and single_landmark
  L generate_random_heightmap.py    # heightmap csv file (for the rover to drive on) from random noise
  L generate_terrain.py             # heightmap mesh model from csv files like the one provided by the ERC
                                    # or the ones randomly generated
L resources                  # files used by the generating scripts, e.g.
  L landmarks                # used by generate_single_landmark
    L marker.blend             # a Blender editable 3D model of the landmark (a textured cube)
    L marker.dae               # the same model exported to dae,
                               # the script copies this to models/landmarks/L*, and changes it to 
                               # reference the correct texture
L worlds         # different worlds we can test our rover in, e.g.
  L erc2018           # the standard world with terrain information from last years competition
    L Landmarks.csv       # Files used to
    L Heightmap.csv       # generate this world
    L models           # models used only by this world
                       # overrides models in rover_sim/models in case of name conflicts
      L all_landmarks      # group model which puts the 12 qr-code markers at the correct positions for this world
      L terrain            # ground with height generated according to Heightmap.csv
    L world.world      # gazebo world-sdf-file, specifies which models are present in the simulated environment
  L Generated         # the standard world when creating a new random environment

Check that your simulation works correctly by running roslaunch rover_sim simulation_joy.launch world:=erc2018. The name credits are below the terrain surface in Gazebo, you may need to rotate and move the camera to see them by pressing shift or ctrl, then click and drag. Stop the simulation by pressing Ctrl+C twice.

Use the scripts/generate_name.py by running rosrun rover_sim generate_name.py in a terminal (You can inspect the script in a text editor e.g. Visual Studio Code). List the available options by running rosrun rover_sim generate_name.py --help, and create a model with your name. Check that the model is generated at models/names/YourName

Open models/names/all_names/model.sdf in a text editor to see the name models to be included in each world. Add your name at a suitable location, the 6-number-String specifies the pose of the name, position and rotation in the format x y z roll pitch yaw

Run the simulation and check that your name is visible and at a good position.

Stage all the necessary files with git add fi/le. Check it with git status. Run git commit -m "a sensible message, like 'added my name'". Run git push. You'll need your GitHub credentials. If you aren't authorized on the repository ask Markus

Thank you :)