Skip to content

Use the package

Erwan MAWART edited this page Apr 24, 2024 · 1 revision

Full program

roslaunch auto_car_ctrl cmd_car.launch

This command will launch the entire program. That include lidar and arduino processes.

Caution

Make sure that Arduino card and lidar are plug before execute.

Possible arguments :

  • dist_follow_wall:=[decimal number] => Distance minimal between the lidar and the wall in meter that the car needs to keep. By default set to 0.15.

Important

Can't be set under 0.1 because of the car size.

  • speed_max:=[decimal number] => Top speed used by the car. It's a pourcentage of the motor maximum speed. By default set to 50.0.
  • rviz:=[boolean] => If true, starts rviz application with correct configuration. By default set to false.
  • arduino_port:=[string] => Selected port where the arduino is plug.Useally get the form ttyACM# in dev/ repository. By default set to ttyACM0.

Raspberry's nodes only

roslaunch auto_car_ctrl auto_car_ctrl_node.launch

This command will launch the three nodes inside this package only. It is usefull for testing the program with a rosbag. You can find some records on the official track here.

Possible arguments :

  • dist_follow_wall:=[decimal number] => Distance minimal between the lidar and the wall in meter that the car needs to keep. By default set to 0.15.

Important

Can't be set under 0.1 because of the car size.

  • speed_max:=[decimal number] => Top speed used by the car. It's a pourcentage of the motor maximum speed. By default set to 50.0.
  • rviz:=[boolean] => If true, starts rviz application with correct configuration. By default set to false.
  • lidar:=[boolean] => If true, includes lidar process in the launch file. By default set to false.

Caution

Make sure that lidar is plug before execute.

Next, if you use a rosbag, you'll need to use this command in a new terminal while the previous roslaunch command is running.

rosbag play -l ~/catkin_ws/src/auto_car_ctrl/rosbags/[NameOfTheRosbag].bag --topics /scan

Tip

To observ outputs you can use rostopic echo [topic]

Lidar processing only

roslaunch auto_car_ctrl lidar_process.launch

This command will launch the three nodes inside this package only. It is usefull for testing the program with a rosbag. You can find some records on the official track here.

Possible arguments :

  • dist_follow_wall:=[decimal number] => Distance minimal between the lidar and the wall in meter that the car needs to keep. By default set to 0.15.

Important

Can't be set under 0.1 because of the car size.

  • rviz:=[boolean] => If true, starts rviz application with correct configuration. By default set to true.
  • lidar:=[boolean] => If true, includes lidar process in the launch file. By default set to false.

Caution

Make sure that lidar is plug before execute.

Next, if you use a rosbag, you'll need to use this command in a new terminal while the previous roslaunch command is running.

rosbag play -l ~/catkin_ws/src/auto_car_ctrl/rosbags/[NameOfTheRosbag].bag --topics /scan

Clone this wiki locally