Skip to content

Commit

Permalink
add mocap launch variable
Browse files Browse the repository at this point in the history
  • Loading branch information
knmcguire committed May 31, 2024
1 parent 33fae44 commit 796c5b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crazyflie/launch/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import Node
from launch.conditions import LaunchConfigurationEquals
from launch.conditions import LaunchConfigurationNotEquals
from launch.conditions import IfCondition
from launch.substitutions import LaunchConfiguration, PythonExpression


Expand Down Expand Up @@ -83,13 +83,14 @@ def generate_launch_description():
DeclareLaunchArgument('debug', default_value='False'),
DeclareLaunchArgument('rviz', default_value='False'),
DeclareLaunchArgument('gui', default_value='True'),
DeclareLaunchArgument('mocap', default_value='True'),
DeclareLaunchArgument('server_yaml_file', default_value=''),
DeclareLaunchArgument('teleop_yaml_file', default_value=''),
DeclareLaunchArgument('mocap_yaml_file', default_value=''),
Node(
package='motion_capture_tracking',
executable='motion_capture_tracking_node',
condition=LaunchConfigurationNotEquals('backend','sim'),
condition=IfCondition(PythonExpression(["'", LaunchConfiguration('backend'), "' != 'sim' and '", LaunchConfiguration('mocap'), "' == 'True'"])),
name='motion_capture_tracking',
output='screen',
parameters= [PythonExpression(["'tmp_motion_capture.yaml' if '", LaunchConfiguration('mocap_yaml_file'), "' == '' else '", LaunchConfiguration('mocap_yaml_file'), "'"])],
Expand Down
3 changes: 3 additions & 0 deletions docs2/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ Also it is a good idea to turn on pose estimation logging such that you are able
pose:
frequency: 10 # Hz
Moreover, be aware that the motion capture node is enabled in the launch file by default, which can be turned off by adding 'mocap:=False' to the launch command.

Simulation
----------

Expand Down

0 comments on commit 796c5b5

Please sign in to comment.