Closed RdDevel closed 1 year ago
Hi
without a backtrace, it is hard to define if this problem happens in the library or your code.
Hi Davide, after a some test I realised that the problem was caused by these two lines of the "MoveToTargetAction" :
if(action_client_ptr_->wait_for_action_server(std::chrono::seconds(timeout)))
{
RCLCPP_ERROR(move_client_logger, "Action server not available after %d seconds", timeout);
}
These lines were left over from an earlier implementation and I think they are not needed with the actual BehaviorTree.ROS2 library. Thus, I'm closing the issue. Thank you for the support.
Hi everyone. I'm having some issues with my first behavior tree implementation.
I created a simple action client, that inherits from the RosActionNode class, in order to send target poses to a 6DOF manipulator but as soon as this client is ticked, I get a segmentation fault.
The main node, i.e. the one that "builds" and ticks the behavior tree, is the following:
And the XML file is:
When running the main node, I get the following output: [INFO] [1693418921.313392475] [move_client_logger]: Reading fixed poses from file: /home/diruscio/ros2_proj/src/parcel_pkg/config/fixed_positions.yaml [INFO] [1693418921.313670412] [move_client_logger]: Fixed poses read correctly [INFO] [1693418921.848795157] [segmentation_client_logger]: Segmentation client initialized [INFO] [1693418921.851096244] [move_client_logger]: Reading fixed poses from file: /home/diruscio/ros2_proj/src/parcel_pkg/config/fixed_positions.yaml [INFO] [1693418921.851268127] [move_client_logger]: Fixed poses read correctly [INFO] [1693418921.872170030] [move_client_logger]: Reading fixed poses from file: /home/diruscio/ros2_proj/src/parcel_pkg/config/fixed_positions.yaml [INFO] [1693418921.872526930] [move_client_logger]: Fixed poses read correctly [INFO] [1693418921.883179841] [move_client_logger]: Reading fixed poses from file: /home/diruscio/ros2_proj/src/parcel_pkg/config/fixed_positions.yaml [INFO] [1693418921.884537858] [move_client_logger]: Fixed poses read correctly [INFO] [1693418921.888328717] [segmentation_client_logger]: Segmentation client initialized [INFO] [1693418921.888423013] [move_client_logger]: Move to home position. [INFO] [1693418921.888430763] [move_client_logger]: Move type: PTP [INFO] [1693418921.888433997] [move_client_logger]: Speed: 1.000 [INFO] [1693418921.888438358] [move_client_logger]: Target x: -0.027 [INFO] [1693418921.888441878] [move_client_logger]: Target y: 0.744 [INFO] [1693418921.888444680] [move_client_logger]: Target z: 0.659 [INFO] [1693418921.888447384] [move_client_logger]: Target qx: -0.707 [INFO] [1693418921.888450183] [move_client_logger]: Target qy: -0.674 [INFO] [1693418921.888452922] [move_client_logger]: Target qz: 0.177 [INFO] [1693418921.888455738] [move_client_logger]: Target qw: -0.120 [ros2run]: Segmentation fault
The target pose is printed before the "setGoal" function returns "true".
The action server does not receive any request. I sure I'm facing a trivial bug, but I have not been able to find it.
Additional information: OS: Ubuntu 22.04 ROS Version: ROS 2 Humble BehaviorTree.ROS2 version: 0.2.0