-
Notifications
You must be signed in to change notification settings - Fork 34
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
MoveIt 2 Move Group C++ Interface #43
Comments
Hello @kavikode ! Can you try without launching the moveIt config again in a different terminal? Thank you |
Same issue @saikishor thanks for your reply. Please provide additional suggestions Terminal 1: ros2 launch tiago_gazebo tiago_gazebo.launch.py moveit:=True world_name:=pick is_public_sim:=True Terminal 2: ros2 run cpp_examples pose_goal Results: |
Similarly, I also tried to modify the code https://github.com/moveit/moveit2_tutorials/blob/main/doc/examples/motion_planning_api/src/motion_planning_api_tutorial.cpp to adapt to Tiago
How do I find or define the robot_description, robot_description_semantic, kinematics_yaml, and planning_yaml for Tiago in order to modify https://github.com/moveit/moveit2_tutorials/blob/humble/doc/examples/motion_planning_api/launch/motion_planning_api_tutorial.launch.py? Thank you |
Hello @kavikode! Thank you for writing to us. You can find that information in the repo: https://github.com/pal-robotics/tiago_moveit_config. This should give you the information you are looking for. Regarding the MoveIt integration with TIAGo, we have checked on our end and it works interfacing with MoveIt. You can also test it with the MoveIt Planning Scene plugin in the Rviz2. You can find the information on how to reproduce it here : https://github.com/pal-robotics/tiago_simulation?tab=readme-ov-file#simulation--moveit-2 Thank you! Best Regards, |
Thanks for your message. I have made the following changes in the results are still negative. How can I best resolve this? After this obstacle is overcome with your support, I can make significant progress and contribute to examples that can be used by others. Please help.
Results: ros2 launch moveit2_tutorials motion_planning_api_tutorial.launch.py |
still trying after many weeks and requesting help again please I understand using ros2 launch tiago_gazebo tiago_gazebo.launch.py moveit:=True and ros2 launch tiago_moveit_config moveit_rviz.launch.py, however, I am unable to move it using C++ code. It is a huge struggle as there are no examples to move the end effector using IK. Can you please share a small code sample in C++? |
Hello @kavikode! If you see the above error, it clearly says that it failed to parse the robot_description. Check if the robort_description is being published or not, and better to do some checking around your code.
As of now, we don't have much to share publicly regarding the MoveIt integration. May be you can get some insights from our public package: play_motions2. I hope this helps, Thank you! Best Regards, |
Motion planning to control Tiago MoveIt 2 Move Group C++ Interface for ROS 2 Humble
Terminal 1: ros2 launch tiago_gazebo tiago_gazebo.launch.py moveit:=True world_name:=pick is_public_sim:=True
Terminal 2: ros2 launch tiago_moveit_config moveit_rviz.launch.py
Then I used the following C++ file pose_goal.cep from the repo https://github.com/ut-ims-robotics/pool-thesis-2023-moveit2-examples and I modified it for the planning group arm:
#include
#include <rclcpp/rclcpp.hpp>
#include <moveit/move_group_interface/move_group_interface.h>
int main(int argc, char * argv[])
{
// Initialize ROS and create the Node
rclcpp::init(argc, argv);
auto const node = std::make_sharedrclcpp::Node("pose_goal");
// Create a ROS logger
auto const logger = rclcpp::get_logger("pose_goal");
// Create the MoveIt Move Group Interface for panda arm
using moveit::planning_interface::MoveGroupInterface;
auto move_group_interface = MoveGroupInterface(node, "arm");
// Create a target Pose for the end-effector
geometry_msgs::msg::Pose target_pose;
target_pose.orientation.w = 1.0;
target_pose.position.x = 0.28;
target_pose.position.y = -0.2;
target_pose.position.z = 0.5;
// Set the target pose
move_group_interface.setPoseTarget(target_pose);
// Create a plan to that target pose and check if that plan is successful
moveit::planning_interface::MoveGroupInterface::Plan my_plan;
bool success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
// If the plan is successful, execute the plan
if(success) {
move_group_interface.execute(my_plan);
} else {
RCLCPP_ERROR(logger, "Planing failed!");
}
// Shutdown
rclcpp::shutdown();
return 0;
}
Terminal 3: ros2 run cpp_examples pose_goal
Results:
[INFO] [1725589103.149830117] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 2.06175 seconds
[INFO] [1725589103.150369063] [moveit_robot_model.robot_model]: Loading robot model 'tiago'...
[INFO] [1725589103.150455974] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[WARN] [1725589103.153558698] [moveit_robot_model.robot_model]: Link base_laser_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.153734240] [moveit_robot_model.robot_model]: Link base_sonar_01_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.153859441] [moveit_robot_model.robot_model]: Link base_sonar_02_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.153933842] [moveit_robot_model.robot_model]: Link base_sonar_03_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.154007663] [moveit_robot_model.robot_model]: Link caster_back_left_1_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.154122424] [moveit_robot_model.robot_model]: Link caster_back_right_1_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.154208935] [moveit_robot_model.robot_model]: Link caster_front_left_1_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.154289036] [moveit_robot_model.robot_model]: Link caster_front_right_1_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.172293933] [moveit_robot_model.robot_model]: Link base_cover_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[WARN] [1725589103.213727746] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!
[INFO] [1725589103.273724043] [move_group_interface]: Ready to take commands for planning group arm.
[INFO] [1725589103.273980655] [move_group_interface]: MoveGroup action client/server ready
[INFO] [1725589103.276105519] [move_group_interface]: Planning request accepted
[INFO] [1725589108.368755300] [move_group_interface]: Planning request aborted
[ERROR] [1725589108.369412777] [move_group_interface]: MoveGroupInterface::plan() failed or timeout reached
[ERROR] [1725589108.369453317] [pose_goal]: Planing failed!
How can I fix this error because I did use the correct planning group named arm? Please advise.
Thank you.
The text was updated successfully, but these errors were encountered: