Skip to content

Commit

Permalink
change node execution order in bringup launch file
Browse files Browse the repository at this point in the history
To fix issues in #30 launch the encoder scrip on the
microcontroller before launching the hardware interface
control loop. This will make sure to send actual tick values
from the encoders to the hardware interface before the control
loop is running.
  • Loading branch information
fjp committed Apr 30, 2021
1 parent 8c73f22 commit f13440f
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions diffbot_bringup/launch/minimal.launch
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
<launch>
<!-- Minimal launch file to bringup the robot hardware -->
<!-- This launch file will launch the package that communicates with the encoders
before running the ROS Controls hardware_interface control loop.
Launching the nodes in this order will make sure that the hardware_interface
receives meaningful tick values from the wheel encoders. -->

<!-- Including the following launch file from diffbot_base package will -->
<!-- Load the robot description onto the parameter server -->
<!-- Run the controller manager with DiffBot's hardware interface -->
<!-- Load the controller config onto the parameter server -->
<include file="$(find diffbot_base)/launch/diffbot.launch">
<!-- arg name="model" value="$(arg model)" /-->
</include>
<!-- Encoders -->
<!-- Run rosserial to connect with the Teensy 3.2 board connected to the motor encoders -->
<node name="rosserial_teensy" pkg="rosserial_python" type="serial_node.py" respawn="false"
output="screen" ns="diffbot" args="_port:=/dev/ttyACM0
_baud:=115200"/>

<!-- Motors -->
<!-- -->
<node name="motor_driver" pkg="grove_motor_driver" type="motor_driver.py" respawn="false"
output="screen" ns="diffbot" />

<!-- Including the following launch file from diffbot_base package will -->
<!-- Load the robot description onto the parameter server -->
<!-- Run the controller manager with DiffBot's hardware interface -->
<!-- Load the controller config onto the parameter server -->
<include file="$(find diffbot_base)/launch/diffbot.launch">
<!-- arg name="model" value="$(arg model)" /-->
</include>


<!-- Motors -->
<!-- -->
<node name="motor_driver" pkg="grove_motor_driver" type="motor_driver.py" respawn="false"
output="screen" ns="diffbot" />

<!-- Encoders -->
<!-- Run rosserial to connect with the Teensy 3.2 board connected to the motor encoders -->
<node name="rosserial_teensy" pkg="rosserial_python" type="serial_node.py" respawn="false"
output="screen" ns="diffbot" args="_port:=/dev/ttyACM0
_baud:=115200"/>
</launch>
</launch>

0 comments on commit f13440f

Please sign in to comment.