Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed running the moveit_resources_panda_moveit_config from demo.launch.py #866

Closed
wei1224hf opened this issue Feb 3, 2024 · 1 comment

Comments

@wei1224hf
Copy link

Description

Overview of your issue here.

Your environment

  • ROS Distro: IRON
  • OS Version: e.g. Ubuntu 22.04
  • Source or Binary build: Moveit2 by binary, tutorials by souce
  • If binary, which release version: moveit2 2.8
  • If source, which git commit or tag:

Steps to reproduce

succeed running the demo.launch.py with this tutorial :
https://github.com/ros-planning/moveit2_tutorials/blob/main/doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.rst
but I wan to try the panda robot , so I install the moveit_resources_panda_moveit_config binary package by:
sudo apt-get install ros-iron-moveit-resources-panda-moveit-config
sudo apt-get install ros-iron-moveit-resources-panda-description
Then I modify the demo.launch.py with:

import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare
from ament_index_python.packages import get_package_share_directory
from moveit_configs_utils import MoveItConfigsBuilder

def generate_launch_description():

# Define xacro mappings for the robot description file
launch_arguments = {
    "robot_ip": "xxx.yyy.zzz.www",
    "use_fake_hardware": "true",
    "gripper": "robotiq_2f_85",
    "dof": "7",
}

# Load the robot configuration
moveit_config = (
    MoveItConfigsBuilder(
        "panda", package_name="moveit_resources_panda_moveit_config"
    )
    .robot_description(mappings=launch_arguments)
    .trajectory_execution(file_path="config/moveit_controllers.yaml")
    .planning_scene_monitor(
        publish_robot_description=True, publish_robot_description_semantic=True
    )
    .planning_pipelines(
        pipelines=["ompl", "stomp", "pilz_industrial_motion_planner"]
    )
    .to_moveit_configs()
)

# Start the actual move_group node/action server
run_move_group_node = Node(
    package="moveit_ros_move_group",
    executable="move_group",
    output="screen",
    parameters=[moveit_config.to_dict()],
)

# RViz for visualization
# Get the path to the RViz configuration file
rviz_config_arg = DeclareLaunchArgument(
    "rviz_config",
    default_value="panda_moveit_config_demo.rviz",
    description="RViz configuration file",
)
rviz_base = LaunchConfiguration("rviz_config")
rviz_config = PathJoinSubstitution(
    [FindPackageShare("moveit2_tutorials"), "launch", rviz_base]
)

# Launch RViz
rviz_node = Node(
    package="rviz2",
    executable="rviz2",
    name="rviz2",
    output="log",
    arguments=["-d", rviz_config],
    parameters=[
        moveit_config.robot_description,
        moveit_config.robot_description_semantic,
        moveit_config.robot_description_kinematics,
        moveit_config.planning_pipelines,
        moveit_config.joint_limits,
    ],
)

# Static TF
static_tf = Node(
    package="tf2_ros",
    executable="static_transform_publisher",
    name="static_transform_publisher",
    output="log",
    arguments=["--frame-id", "world", "--child-frame-id", "base_link"],
)

# Publish TF
robot_state_publisher = Node(
    package="robot_state_publisher",
    executable="robot_state_publisher",
    name="robot_state_publisher",
    output="both",
    parameters=[moveit_config.robot_description],
)

# ros2_control using mock hardware for trajectory execution
ros2_controllers_path = os.path.join(
    get_package_share_directory("moveit_resources_panda_moveit_config"),
    "config",
    "ros2_controllers.yaml",
)
ros2_control_node = Node(
    package="controller_manager",
    executable="ros2_control_node",
    parameters=[ros2_controllers_path],
    remappings=[
        ("/controller_manager/robot_description", "/robot_description"),
    ],
    output="both",
)

joint_state_broadcaster_spawner = Node(
    package="controller_manager",
    executable="spawner",
    arguments=[
        "joint_state_broadcaster",
        "--controller-manager",
        "/controller_manager",
    ],
)

arm_controller_spawner = Node(
    package="controller_manager",
    executable="spawner",
    arguments=["panda_arm_controller", "-c", "/controller_manager"],
)


hand_controller_spawner = Node(
    package="controller_manager",
    executable="spawner",
    arguments=["panda_hand_controller", "-c", "/controller_manager"],
)


return LaunchDescription(
    [
        rviz_config_arg,
        rviz_node,
        static_tf,
        robot_state_publisher,
        run_move_group_node,
        ros2_control_node,
        joint_state_broadcaster_spawner,
        arm_controller_spawner,
        hand_controller_spawner,
    ]
)

Then I build it , then run it, then errors comes out:

[spawner-6] [INFO] [1706863336.316555922] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-8] [INFO] [1706863336.755889541] [spawner_panda_hand_controller]: Waiting for '/controller_manager' services to be available
[spawner-7] [INFO] [1706863336.771893800] [spawner_panda_arm_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [ERROR] [1706863338.328291305] [spawner_joint_state_broadcaster]: Controller manager not available
[ERROR] [spawner-6]: process has died [pid 3495, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --ros-args'].
[spawner-8] [ERROR] [1706863338.767587140] [spawner_panda_hand_controller]: Controller manager not available
[spawner-7] [ERROR] [1706863338.783745145] [spawner_panda_arm_controller]: Controller manager not available
[ERROR] [spawner-8]: process has died [pid 3505, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner panda_hand_controller -c /controller_manager --ros-args'].
[ERROR] [spawner-7]: process has died [pid 3497, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner panda_arm_controller -c /controller_manager --ros-args'].

Expected behaviour

I can do motion planning with rviz to simulate the panda robot

Backtrace or Console output

image
image
image
image
image
image
image

@mikeferguson
Copy link
Contributor

Iron is now EOL (and tutorials never quite worked there either based on our CI issues it seems)

@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants