Giter VIP home page Giter VIP logo

Comments (9)

sea-bass avatar sea-bass commented on July 30, 2024

@zhangbo9426426 I just set this up on Humble and the example worked for me.

Could you check that maybe you don't have other MoveIt versions installed as binaries? If you do

apt list --installed | grep ros-humble-moveit

and something come up, could you then try

sudo apt remove ros-humble-moveit*

and try again?

from moveit2_tutorials.

zhangbo9426426 avatar zhangbo9426426 commented on July 30, 2024

@sea-bass Thank you for your reply.
I checked to see if there was any other binary version of moveit by do
apt list --installed | grep ros-humble-moveit
and there was one:
ros-humble-moveit-msgs/jammy,now 2.1-1jammy.20231117.191327 amd64
and I uninstall ros-humble-moveit-msgs by executing sudo apt remove ros-humble-moveit*
then running ros2 launch dual_arm_moveit2 demo.launch.py again, which causes RVIZ to fail to start with the following error message:

PluginlibFactory: The plugin for class 'moveit_rviz_plugin/PlanningScene' failed to load. Error: Failed to load library /home/zhangbo/moveit2_ws/install/moveit_ros_visualization/lib/libmoveit_planning_scene_rviz_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library dlopen error: libmoveit_msgs__rosidl_typesupport_cpp.so:

After I re-installed the plugin using sudo apt install ros-humble-moveit-msgs, I was able to start RVIZ normally, but unfortunately I still came back to the problem I originally mentioned

Looking forward to your response.

from moveit2_tutorials.

sea-bass avatar sea-bass commented on July 30, 2024

I think you may want to uninstall that moveit_msgs binary and instead build it from source alongside your source build of moveit2. Could you try that?

from moveit2_tutorials.

zhangbo9426426 avatar zhangbo9426426 commented on July 30, 2024

I think you may want to uninstall that moveit_msgs binary and instead build it from source alongside your source build of moveit2. Could you try that?
I have uninstalled binary moveit_msgs and built moveit_msgs from the source code, and then restarted the demo to enter the rviz interface normally. But when I run ros2 run moveit2_tutorials moveit_cpp_tutorial the initial problem still arises

from moveit2_tutorials.

sea-bass avatar sea-bass commented on July 30, 2024

I see. Two things, then.

  1. I didn't notice this before, but can you instead run ros2 launch moveit2_tutorials moveit_cpp_tutorial.launch.py? These errors may actually be that a lot of the launch parameters are missing if you just run the standalone executable with ros2 run.
  2. If the above doesn't work, could you share your entire console log?

from moveit2_tutorials.

zhangbo9426426 avatar zhangbo9426426 commented on July 30, 2024

I was able to run ros2 launch moveit2_tutorials moveit_cpp_tutorial.launch.py normally, and at the same time hit the “next” button in RvizVisualToolGui in the RVIZ console and the arm would work normally.

In fact, my main purpose is to use the new MovitCPP API in ROS2 when writing programs in c++. But I found that every time the “moveit_cpp_tutorial.cpp“ demo program interrupt occurs at auto moveit_cpp_ptr = std::make_shared<moveit_cpp::MoveItCpp>(node); by outputting information in the terminal.

from moveit2_tutorials.

sea-bass avatar sea-bass commented on July 30, 2024

Yes, because the node needs certain parameters to work correctly, and if you call ros2 run on that executable, the node has no overridden parameters unless you start adding things like --ros-args -p ... to the end of that command...

... which launch files make a little easier to do.

It shouldn't segfault, and anyone is welcome to fix this with better error handling, but also it's expected that MoveIt nodes need parameters to work correctly.

from moveit2_tutorials.

zhangbo9426426 avatar zhangbo9426426 commented on July 30, 2024

Yes, because the node needs certain parameters to work correctly, and if you call ros2 run on that executable, the node has no overridden parameters unless you start adding things like --ros-args -p ... to the end of that command...

... which launch files make a little easier to do.

It shouldn't segfault, and anyone is welcome to fix this with better error handling, but also it's expected that MoveIt nodes need parameters to work correctly.

I see. Thank you very much for your response.

from moveit2_tutorials.

sea-bass avatar sea-bass commented on July 30, 2024

Of course! I'll go ahead and close this issue, but please let us know as anything else comes up.

from moveit2_tutorials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.