pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
728 stars 164 forks source link

Linking error re. get_velocity_brake_trajectory #70

Closed AndyZe closed 3 years ago

AndyZe commented 3 years ago

Ruckig is now available as an option for trajectories in MoveIt2. That's cool.

Besides trajectories, I'm also trying to use it to smooth one waypoint at a time. In velocity mode: ruckig_input_->control_interface = ruckig::ControlInterface::Velocity;

It always crashes immediately upon calling ruckig_->update() with this: [component_container-3] /opt/ros/rolling/lib/rclcpp_components/component_container: symbol lookup error: /home/andy/ws_ros2/install/moveit_core/lib/libmoveit_ruckig_filter.so: undefined symbol: _ZN6ruckig5Brake29get_velocity_brake_trajectoryEddddRSt5arrayIdLm2EES3

I have tried ROS2 Rolling v0.4.0 installed from debian and also installing Ruckig from source (sudo make install).

I also set the debug flag to true but I guess it crashes before it can print anything. Ruckig<0, true /*debug*/>

Here's a print of some of the inputs just to verify that it's not garbage input. This is for a 7-dof robot.

current pos[0]: 0 current pos[6]: 0.785 current vel[0]: 0 current vel[6]: 0 current accel[0]: 0 current accel[6]: 0 target vel[0]: -4.34322e-13 target vel[6]: -4.76743e-13 target accel[0]: 0 target accel[6]: 0 max vel[0]: 2.3925 max vel[6]: 2.871 max accel[0]: 10 max accel[6]: 10 max jerk[0]: 20 max jerk[6]: 20

The demos in the build folder of the package work just fine.

AndyZe commented 3 years ago

The same issue in Position mode:

symbol lookup error: /home/andy/ws_ros2/install/moveit_core/lib/libmoveit_ruckig_filter.so: undefined symbol: _ZN6ruckig5Brake29get_position_brake_trajectoryEdddddddRSt5arrayIdLm2EES3_

AndyZe commented 3 years ago

I copy-pasted this line in the wrong place. It works now.

target_link_libraries(moveit_ruckig_filter
  moveit_robot_model
  ruckig::ruckig // <-- did not have this line originally
)