Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminate called after throwing an instance of 'std::runtime_error' #1

Open
Aruen24 opened this issue Nov 18, 2024 · 6 comments
Open

Comments

@Aruen24
Copy link

Aruen24 commented Nov 18, 2024

企业微信截图_1731900267794
@JuoTungChen
Copy link
Owner

Hi,
Please provide more details on what command you are running and what the issues you are encountering so I can assist, thanks!

@Aruen24
Copy link
Author

Aruen24 commented Nov 18, 2024

Hi, Please provide more details on what command you are running and what the issues you are encountering so I can assist, thanks!

@JuoTungChen
run the moveit_server_node.cpp file

#include <moveit_ur5_msgs/srv/plan_request.hpp>
#include <moveit_ur5_interface/moveit_pose_server.hpp>

int main(int argc, char** argv){
rclcpp::init(argc, argv);

std::shared_ptr<moveit_ur5::service> moveit_server = std::make_shared<moveit_ur5::service>("moveit_interface_server");
rclcpp::executors::MultiThreadedExecutor executor;
executor.add_node(moveit_server);
executor.spin();
rclcpp::shutdown();

return 0;

}

@JuoTungChen
Copy link
Owner

JuoTungChen commented Nov 18, 2024

Can you provide additional information on what system and ROS version you are running?
Also, in addition to the server node, do you also run a client node or use ros2 topic to send planning request?

Another thing you can try is run the launch file:

ros2 launch moveit_ur5_interface moveit_ur5_interface_sim.launch

This will launch a UR5 in simulation and run the server node for you.
Then you can use a command line like the following to send planning request and move the robot:

ros2 service call /moveit_ur5/target_pose moveit_ur5_msgs/srv/PlanRequest "{target:{position: {x: -0.3, y: -0.4, z: 0.6}, orientation: {x: -1.0, y: 0.0, z: 0.0, w: 0.0}}}"

Hope this helps!

@Aruen24
Copy link
Author

Aruen24 commented Nov 18, 2024

Can you provide additional information on what system and ROS version you are running? Also, in addition to the server node, do you also run a client node or use ros2 topic to send planning request?

Another thing you can try is run the launch file:

ros2 launch moveit_ur5_interface moveit_ur5_interface_sim.launch

This will launch a UR5 in simulation and run the server node for you. Then you can use a command line like the following to send planning request and move the robot:

ros2 service call /moveit_ur5/target_pose moveit_ur5_msgs/srv/PlanRequest "{target:{position: {x: -0.3, y: -0.4, z: 0.6}, orientation: {x: -1.0, y: 0.0, z: 0.0, w: 0.0}}}"

Hope this helps!

@JuoTungChen
ubuntu22.04
ROS version is ros2
I also run a client node
Some people on the Internet said that this problem may be caused by
action server but nothing is ready" indicates that your code is trying to fetch data from an action server, but the server hasn't provided any data yet (i.e., it's not ready)

@JuoTungChen
Copy link
Owner

Hi,
Thank you for providing the information. Note that this code is only tested on ubuntu 20.04 for ROS2 Galactic, but I will try to see if I can reproduce this error.

@Aruen24
Copy link
Author

Aruen24 commented Nov 18, 2024

Hi, Thank you for providing the information. Note that this code is only tested on ubuntu 20.04 for ROS2 Galactic, but I will try to see if I can reproduce this error.

@JuoTungChen ubuntu 22.04 and ros2 humble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants