Dsp icon indicating copy to clipboard operation
Dsp copied to clipboard

Unable to publish Spline path

Open ajay1606 opened this issue 5 months ago • 3 comments

@grammers Thanks for all your help and we were able to move the robot according to the DSP path planner. its working pretty well. I am trying to working on smoothing trajectory, and I have seen option to spline path but its not publishing after enabling in code. Also getting some error message while publishing spline path.

Seems like splinepath_ is 3D vector and publisher looking for type of path_. Also I checked there is a variable splinecells_, but never used it.

https://github.com/LTU-RAI/Dsp/blob/ac0e78f5f4b84d7d968e2975fbba71c3144aa96b/dsp/src/dsp.cpp#L618-L622


error: ‘using SharedPtr = class std::shared_ptr<rclcpp::Publisher<nav_msgs::msg::Path_<std::allocator<void> > > >’ {aka ‘class std::shared_ptr<rclcpp::Publisher<nav_msgs::msg::Path_<std::allocator<void> > > >’} has no member named ‘publish’
  627 |    splinepath_pub_.publish(dspPathToRosMsg(splinepath_, true));

Appreciate any help.

ajay1606 avatar Jul 16 '25 19:07 ajay1606

Assume you have uncommented the linked block (line 618-622) as well as line 611. I have had multiple reliability issues with the spline path, but I have used it resently in ROS 1. I will have to investigate why it isn't working in ROS 2. I have time to do it in the beginning of next week, I will notify you when I found a solution.

grammers avatar Jul 17 '25 05:07 grammers

@grammers Thanks for the response, Yes I have did uncommented the lines showed in the link, but unfortunately end up with build errors. I see problem with the

https://github.com/LTU-RAI/Dsp/blob/ac0e78f5f4b84d7d968e2975fbba71c3144aa96b/dsp/src/dsp.cpp#L621

where publisher splinepath_pub_ cannot publish data from variable splinepath_ , instead it should be splinecells_. Though there is splinecells_ is declared, it never used or assigned with any data.

ajay1606 avatar Jul 17 '25 14:07 ajay1606

The new version is live, where the spline path works. It was some bugs.

grammers avatar Jul 20 '25 20:07 grammers