Unified hexapod repository, containing all modules
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

37 lignes
1.2KB

  1. from launch import LaunchDescription
  2. from launch.actions import RegisterEventHandler
  3. from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution
  4. from launch.event_handlers import OnProcessExit
  5. from launch_ros.actions import Node
  6. from launch_ros.substitutions import FindPackageShare
  7. from moveit_configs_utils import MoveItConfigsBuilder
  8. def generate_launch_description():
  9. moveit_config = (
  10. MoveItConfigsBuilder("hexapod_robot", package_name = "hexapod_robot")
  11. .planning_scene_monitor(
  12. publish_robot_description=True, publish_robot_description_semantic=True
  13. )
  14. .planning_pipelines(pipelines = ["ompl"])
  15. .to_moveit_configs()
  16. )
  17. rviz_node = Node(
  18. package = "rviz2",
  19. executable = "rviz2",
  20. arguments = ['-d', PathJoinSubstitution([FindPackageShare("hexapod_robot"), "config", "hexapod_robot.rviz"])],
  21. name = "rviz2",
  22. output = "screen",
  23. parameters = [moveit_config.planning_pipelines, moveit_config.robot_description_kinematics]
  24. )
  25. nodes = [
  26. rviz_node
  27. ]
  28. return LaunchDescription(nodes)