Launch Files
These are .launch files that can be run using roslaunch:
roslaunch rktl_control <launch file>
ball.launch
This launches a mean_odom_filter node
to start the ball tracking with parameters supplied by
rktl_control/config/mean_odom_filter.yaml.
Nodes
ball/mean_odom_filter:mean_odom_filternode from therktl_controlpackage. Parameters supplied byrktl_control/config/mean_odom_filter.yaml.
car.launch
This launches the filter (either a
particle filter or a
rolling average) to track the car, as
well as the controller needed to control it.
The type of filter can be changed by the use_particle_filter argument.
Parameters are provided by rktl_control/config/particle_odom_filter.yaml or
rktl_control/config/mean_odom_filter.yaml (depending on the filter chosen) and
rktl_control/config/controller.yaml.
Launch Arguments
car_name(default:car0): Name of the car to launch the agent for.use_particle_filter(default: true): If true, a particle filter is used. Otherwise, a rolling average is used.
Nodes
mean_odom_filter:mean_odom_filternode from therktl_controlpackage. Only run ifuse_particle_filteris set to false. Parameters supplied byrktl_control/config/mean_odom_filter.yaml.particle_odom_filter:particle_odom_filternode from therktl_controlpackage. Only run ifuse_particle_filteris set to true (the default). Parameters supplied byrktl_control/config/particle_odom_filter.yaml.controller:controllernode from therktl_controlpackage. Parameters supplied byrktl_control/config/controller.yaml.
hardware_interface.launch
This takes a rktl_msgs/ControlEffort message and sends it to a physical car. The efforts in the message range from -1.0 to +1.0 corresponding to full reverse for full forward motor speed, or full left or full right steering angle respectively. Technically, you can also feed in values with an absolute value greater than 1.0. This is useful for having higher actuator saturation limits in the controller, or perhaps implementing a “boost” for human controlled cars.
Physically, the interface code runs on a Teensy 3.2 microcontroller. The microcontroller is connected to a computer via USB, and code running on the computer allows it to pull control effort messages from the ROS network. The microcontroller is also connected to FrSky XJT radio transmitter, which allows it to send these controls to the car.
Note that in order for this node to work, it need to be run on a Linux computer
with that the docker container needs to be run with
the --privileged option.
Nodes
hardware_interface:serial_node.pynode from therosserial_arduinopackage. This node allows the firmware on a connected Teensy to interface with the rest of the ROS network. Parameters, including the serial port used by the Teensy, are supplied byrktl_control/config/hardware_interface.yaml.
keyboard_control.launch
This launches a keyboard_interface
node to allow for controlling the car using the keyboard.
Nodes
cars/{car_name}/keyboard_interface:keyboard_interfacenode from therktl_controlpackage. The namespace of this node is affected by thecar_nameparameter to ensure that the node interacts with the correct topics.
Parameters
car_name(default:car0): Name of the car to control with the keyboard interface.
xbox_control.launch
This launches a xbox_interface
node and all related nodes to allow for controlling the car using an xbox
controller.
Nodes
cars/{car_name}/joy_node:joy_nodenode from thejoypackage. This node publishes the current state of the joystick to be used by thexbox_interfacenode. The namespace of this node is affected by thecar_nameparameter to ensure that the node interacts with the correct topics.cars/{car_name}/xbox_interface:xbox_interfacenode from therktl_controlpackage. The namespace of this node is affected by thecar_nameparameter to ensure that the node interacts with the correct topics.cars/{car_name}/controller_delay:topic_delaynode from therktl_controlpackage. This adds delay to the output of thejoy_nodetopic The namespace of this node is affected by thecar_nameparameter to ensure that the node interacts with the correct topics.cars/{car_name}/controller_delay_mux:muxnode from thetopic_toolspackage. This node subscribes to the raw joystick and delayed joystick topics and republishes it onto a combined topic. The namespace of this node is affected by thecar_nameparameter to ensure that the node interacts with the correct topics.
Parameters
device(default:/dev/input/js0): Device file of the joystick.car_name(default:car0): Name of the car to control with the keyboard interface.delay(default:0.1): Amount of simulated delay to add to the controller input