This section explains how to start with developing in the FreiCar framework.
- The first time, you want to start the FreiCar framework, you have to build all ROS packages. Go to
catkin build. Afterwards, you might have to resource by typing
- As the first step you should start the simulator by starting
local_comp_launch.launch. For this please read the Simulator section section.
- Now the simulator should be started and you are ready to spawn your car.
roslaunch freicar_agent spawn_car.launch name:=freicar_anyname tf_name:=freicar_anyname spawn/x:=0 spawn/y:=0 spawn/z:=0 spawn/heading:=20 use_yaml_spawn:=true sync_topic:=!. Now your car "freicar_anyname" is spawned in the world and all sensors of the respective car are running. The car-name should be changeable throughout the course, so do not hardcode the name in your future own programs but use always ros-parameters.
- Now start the Rviz tool to visualize the world and the cars sensors. You should explore what data is available with
Start Programming your own Code
For the FreiCar Course you can freely program any ROS node you want to have. However one node has to send the "Track Request".
We prepared a template node Freicar Agent for you that sends the "Track Request" and shows how to initialize an HD map, get the sensor data or requests a localization-pose from the tf-system. This node is a good starting point if you want to program in C++.
Overall, either you base on the template Freicar Agent node that has this functionality already, or you simply run the Freicar Agent node as it is in order to send the track request.
Running the Freicar Agent node can be done with (NOTE: This also spawns the car so use this command instead of spawn_car.launch):
roslaunch freicar_agent sim_agent.launch name:=freicar_anyname tf_name:=freicar_anyname spawn/x:=0 spawn/y:=0 spawn/z:=0 spawn/heading:=20 use_yaml_spawn:=true sync_topic:=!
Always make your own private repository for your software. No changes to the submodules
freicar_executables are allowed.
If you want to use code from these submodules you are allowed to copy these nodes, improve them, rename them and push them in your repository.