Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Running

Once the project is set up it is time to run the project.

Sourcing

Step one is to set up the environment to use this ROS project.

  • In the root folder of the project.
    • catkin_make
    • source devel/setup.bash

This will configure your terminal to use these project files going forwards. If you want to run a different project then you will need the source the setup file for that project before it will work.

catkin_make should only need to be run once.

source devel/setup.bash will need to be run in each new terminal window.

Compiling

Once you have sourced your project you need to compile it.

ROS uses a system called catkin to compile all of the individual modules for you.

  • In the root folder of the project.
    • catkin_make

Running

With you code compiled you are now able to run the various ROS nodes of your project.

There are two ways to do this.

  1. Manually.
  2. Using a launch file.

Manually is not recommended but is sometimes needed during development.

  • Run roscore in one terminal.
  • Run the individual ROS nodes you require using the rosrun command.
    • Follow the ROS tutorials if you want to know how.

Using a launch file.

  • Run roslaunch example.launch
    • All of the ROS nodes will be run for you.

In this training we are going to be using launch files.

  • Make sure that Webots is already running.
    • The simple_2022.wbt world is open.
    • The robot controller is set to <extern>.
  • Run roslaunch launch/simulation_autostart.launch.
  • The simulated vehicle should start moving.