moveit / moveit_visual_tools

Helper functions for displaying and debugging MoveIt! data in Rviz via published markers
BSD 3-Clause "New" or "Revised" License
151 stars 102 forks source link

moveit_visual_tools::MoveItVisualTools::publishTrajectoryPath unchecked read of possibly null pointer #94

Open werner291 opened 3 years ago

werner291 commented 3 years ago

Hello,

see the line: https://github.com/ros-planning/moveit_visual_tools/blob/c166f8ee6412023b4183fc091abe6acbcdba2448/src/moveit_visual_tools.cpp#L1254

That line can segfault, because the robot_model_ may be a null pointer. This is possibly due to me using MoveIt without a source of "current" robot state information, I just want to plan hypothetical paths.

Looks like that method is missing a loadSharedRobotState();.

Calling that method from user code beforehand makes causes the segfault to disappear.

v4hn commented 3 years ago

Thank you for pointing it out, but could you please create a pull-request to fix this issue? It sounds like you already fixed it in your own setup.

werner291 commented 3 years ago

Pull request opened. I fixed it in user code, but adding that line to the source should fix it as well.