Unified hexapod repository, containing all modules
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

37 rindas
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)