After a day of reading a book on ROS, I have a few questions.
Please bear with me since it will be a tad long. I have 3 questions and each question has sub-sections. I am following the ROS Robotics by example by Dr. Harman. I am asking these questions after a lot of googling but could not find or understand the answers provided. Kindly explain to me the following questions like I am 5.
1) To spawn turlebot in my custom map, I copied the lauch folder from /opt/ros/kinetic/share/turtlebot_gazebo
to my package named trial
. Then I set the TURTLEBOT_GAZEBO_WORLD_FILE=/home/kacd/catkin_ws/src/trial/worlds/map.world
to load the turtlebot to my custom world.
Alternatively, I could also have done roslaunch turtlebot_gazebo turtlebot_world.launch world_file:=<full path to the world file>
But then I would have had to run it from the turtlebot_gazebo package.
1a)What's the best way to do this to spawn turtlebot to a custom map from (?) your package?
1b) We know that when turtlebot is spawned, a node cmd_vel is already associated with it that we publish the velocities to. Let's say that we spawn our model. How can you associate the same node (cmd_vel) to your model? Do we do it through launch files?
2) On reading further, I realized that we create launch files for Rviz and Gazebo separately
2a) How can we create launch files?
2b) What are the requirements for making a .launch file i.e. what all data, files should we have?
2c) Is the following statement correct: .launch files contain the nodes associated with a robot/model. If not then what does a launch file contain?