Skip to content

Commit

Permalink
Improve: panda_moveit: Add parameters for perception tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
130s committed Jun 9, 2023
1 parent a035b68 commit f949062
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions panda_moveit_config/launch/demo.launch.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.conditions import IfCondition, UnlessCondition
import launch_ros
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from ament_index_python.packages import get_package_share_directory
from moveit_configs_utils import MoveItConfigsBuilder


def _octomap_launch_params():
_path_panda_sensor_conf = PathJoinSubstitution(
[
launch_ros.substitutions.FindPackageShare("panda_moveit_config"),
"config",
"sensors_kinect_pointcloud.yaml"
])
_params = [
launch_ros.parameter_descriptions.ParameterFile(
param_file=_path_panda_sensor_conf,
allow_substs=True),
{"octomap_frame": "odom_combined"},
{"octomap_resolution": "0.05"},
{"max_range": "5.0"}]
return _params

def generate_launch_description():

# Command-line arguments
Expand Down Expand Up @@ -49,7 +66,7 @@ def generate_launch_description():
package="moveit_ros_move_group",
executable="move_group",
output="screen",
parameters=[moveit_config.to_dict()],
parameters=[moveit_config.to_dict()] + _octomap_launch_params(),
arguments=["--ros-args", "--log-level", "info"],
)

Expand Down

0 comments on commit f949062

Please sign in to comment.