Skip to content

ExistentialRobotics/car_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car Control

This package contains a collection of nodes that perform local control driving a differential drive robot to a desired state.

The dd_control_node controller is based on the intuition from https://cs.gmu.edu/~kosecka/cs485/lec04-control.pdf, while the power_diagram_node is based on the paper: https://repository.upenn.edu/ese_papers/724/.

C++ and ROS Usage

The nodes take in the target pose from ~position_cmd and the current pose/odometry from ~pose or ~odom. And then output the velocity commands to ~commands.

The recommended angular-to-linear gain ratio is 3:1.

Example Launching the Controller Nodes:

<!--Launch a DD Controller Node -->
<group ns="$(arg ns)">
  <node name="dd_control_node" pkg="car_control" type="dd_control_node" output="screen">
        <rosparam file="$(find dd_control)/config/dd_gains.yaml" command="load"/>
        <remap from="~position_cmd" to="<your_target_pose_topic>"/>
        <remap from="~odom" to="<your_odom_topic>"/>
        <remap from="~commands" to="<your_commands_topic>"/>
  </node>
</group>

<!--Launch a Power Diagram Node -->
<group ns="$(arg ns)">
  <node name="power_diagram_node" pkg="car_control" type="power_diagram_node" output="screen">
        <rosparam file="$(find dd_control)/config/power_diagram_gains.yaml" command="load"/>
        <remap from="~position_cmd" to="<your_target_pose_topic>"/>
        <remap from="~odom" to="<your_odom_topic>"/>
        <remap from="~commands" to="<your_commands_topic>"/>
  </node>
</group>

<!--Launch a Cone Controller Node -->
<group ns="$(arg ns)">
    <node pkg="car_control" type="cone_controller_node.py" name="cone_controller"  output="screen">
        <param name="odom_topic" value="<your_odom_topic>"/>
        <param name="odom_type" value="<your_odom_message_type_{odom/poseS}>"/>
        <param name="setpoint_topic" value="<your_target_pose_topic>"/>
        <param name="setpoint_type" value="<your_target_pose_message_type_{pose2/poseS}>"/>
        <remap from="/cmd_vel" to="<your_commands_topic>" />
        <param name="ctrl_freq" value="50.0"/>
        <param name="kv" value="0.5"/>
        <param name="kw" value="1.5"/>
        <!-- Control limits are set as the same as in control.yaml in jackal_control package -->
        <!-- linear velocity limit m/sec-->
        <param name="v_min" value="-2.0"/>
        <param name="v_max" value="2.0"/>
        <!-- angular velocity limit rad/sec-->
        <param name="w_min" value="-4.0"/>
        <param name="w_max" value="4.0"/>
    </node>
</group>

Python Usage

cd script
python3 dd_controller.py

Main Controller

Main Controller

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

9 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors