Skip to content

Moveit2 humble: how to use customized robot description and control it in Rviz #1051

@MyLovelyAxe

Description

@MyLovelyAxe

I am trying to control a cutomized robot model with MoveIt2 in ROS humble, e.g. I have a urdf file, load it in MoveIt Setup Assistant and get a config packages. What should I do next? Do I need to build all packages from moveit2-tutorials?

.
├── launch_param_builder
├── moveit2
│   ├── moveit
│   ├── moveit2.repos
│   ├── moveit_commander
│   ├── moveit_common
│   ├── moveit_configs_utils
│   ├── moveit_core
│   ├── moveit_experimental
│   ├── moveit_kinematics
│   ├── moveit_planners
│   ├── moveit_plugins
│   ├── moveit_ros
│   ├── moveit_runtime
│   ├── moveit_setup_assistant
├── moveit2_tutorials
├── moveit_resources
│   ├── fanuc_description
│   ├── fanuc_moveit_config
│   ├── moveit_resources
│   ├── panda_description
│   ├── panda_moveit_config
│   ├── pr2_description
├── moveit_task_constructor
├── moveit_visual_tools
├── rosparam_shortcuts
└── srdfdom

In order to do this without full moveit2-tutorial packages, I tried this:

I have gone through MoveIt2 humble tutorial from official instruction page, I managed to build the entire moveit2-tutorial and give goal state with hello_moveit package (in Your First C++ MoveIt Project tutorial.) But this is based on launching rviz with:

ros2 launch moveit2_tutorials demo.launch.py

In my project, I want to give goal poses also through customized package without replying on moveit2_tutorial launching. So I tried this pipeline:

  1. Launch Rviz with ros2 launch moveit_resources_panda_moveit_config demo.launch.py, which is from config package for panda robot from MoveIt Setup Assistant. This works fine, I still can give goal state through MotionPlanning panel in Rviz.
  2. Run hello_moveit with ros2 run hello_moveit hello_moveit

But this fails with this error:

[ERROR] [1750504638.173724344] [hello_moveit]: Could not find parameter robot_description_semantic and did not receive robot_description_semantic via std_msgs::msg::String subscription within 10.000000 seconds.
Error:   Could not parse the SRDF XML File. Error=XML_ERROR_EMPTY_DOCUMENT ErrorID=13 (0xd) Line number=0
         at line 732 in /home/hardli/ROS2/moveit2_tutorial_ws/src/srdfdom/src/model.cpp
[ERROR] [1750504638.180391933] [moveit_rdf_loader.rdf_loader]: Unable to parse SRDF
[FATAL] [1750504638.180900135] [move_group_interface]: Unable to construct robot model. Please make sure all needed information is on the parameter server.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to construct robot model. Please make sure all needed information is on the parameter server.
[ros2run]: Aborted

I can confirm that if I launch Rviz through ros2 launch moveit2_tutorials demo.launch.py and use ros2 run hello_moveit hello_moveit to give goal state, it works. I assume that ros2 launch moveit2_tutorials demo.launch.py launch something that ros2 launch moveit_resources_panda_moveit_config demo.launch.py doesn't launch. But I have no clue what is that and how to find it.

If the direction that I tried is totally wrong, I appreciate to have an advice!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions