Launching ROS Drivers

ROS Launch (Preferred)

ROS provides a utility (invoked with roslaunch) to launch nodes with specific configurations in what are known as launch files. A launch file allows multiple configurations or complex configurations of launching a node (or multiple nodes) in a ROS environment. AutonomouStuff provides example launch files with all drivers in our AutonomouStuff Driver Pack. Example launch files can be found at <as_drivers_install>/install/share/<node_name>/launch/. Paths to launch files do not need to be supplied if the AutonomouStuff Driver Pack location is included in the ROS_PACKAGE_PATH.

To run a specific driver's launch file using roslaunch:

roslaunch <package_name> <file_name>.launch

e.g.

roslaunch delphi_esr delphi_esr.launch

To provide values for arguments defined in the launch file:

roslaunch delphi_esr delphi_esr.launch can_hardware_id:=<ID> can_circuit_id:=<ID> esr_frame_id:=<frame_id>

ROS Run

rosrun can be used to invoke a binary manually. This uses the same information as a <node> definition in a launch file.

To run a driver using rosrun:

rosrun <package_name> <node_name> <rosparams and arguments>

e.g.

rosrun delphi_esr delphi_esr_can _can_hardware_id:=<ID> _can_circuit_id:=<ID> _sensor_frame_id:=<frame_id>

or alternatively you can invoke the executable by using its path 

./delphi_esr_can _can_hardware_id:=<ID> _can_circuit_id:=<ID> _sensor_frame_id:=<frame_id>

 



Related pages