Move Cartesian with MoveIt
Hello,
i would like to move the robot "Franka Emika Panda" with the cartesian movement in C++. I make the configuration which is recommended on the homepage. My current result is to move the robot with joint movement with moveit. Then I trying the cartesian movement with the following link:
http://docs.ros.org/kinetic/api/movei...
In this section they show how it works with the simulation, but i would like to try this one on the real robot. I hope i can get some tips to solve my problem.
EDIT: I add the source code and the launch-file which i use.
SOURCE CODE
//Cartesian Path
geometry_msgs::Pose target_pose3 = move_group.getCurrentPose().pose;
std::cout<< "Anfangsposition" << std::endl;
std::cout<< target_pose3 << std::endl;
std::vector<geometry_msgs::Pose> waypoints;
waypoints.push_back(target_pose3);
target_pose3.position.z -= 0.2;
waypoints.push_back(target_pose3); //down
target_pose3.position.y -= 0.2;
waypoints.push_back(target_pose3); //right
target_pose3.position.z += 0.2;
target_pose3.position.y += 0.2;
target_pose3.position.x -= 0.2;
waypoints.push_back(target_pose3);
// Skalierungsfaktor der maximalen Geschwindigkeit jedes Gelenks
move_group.setMaxVelocityScalingFactor(0.1);
moveit_msgs::RobotTrajectory trajectory;
const double jump_threshold = 0.5;
const double eef_step = 0.01;
move_group.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory);
moveit::planning_interface::MoveGroupInterface::Plan goal_plan;
goal_plan.trajectory_ = trajectory;
move_group.execute(goal_plan);
LAUNCH-FILE
<?xml version="1.0" ?>
<launch>
<arg name="robot_ip" />
<include file="$(find franka_control)/launch/franka_control.launch">
<arg name="robot_ip" value="172.16.0.2" />
<arg name="load_gripper" value="false" />
</include>
<include file="$(find panda_moveit_config)/launch/panda_moveit.launch">
<arg name="load_gripper" value="false" />
</include>
</launch>
When i start my source code then i get some information back from the console
INFO] [1551336690.500652276]: Received request to compute Cartesian path
[ INFO] [1551336690.501040209]: Attempting to follow 4 waypoints for link 'panda_link8' using a step of 0.010000 m and jump threshold 0.500000 (in global reference frame)
[ INFO] [1551336690.507374299]: Computed Cartesian path with 2 points (followed 2.597403% of requested trajectory)
[ INFO] [1551336690.508019615]: Execution request received
[ WARN] [1551336690.534495590]: Dropping first 1 trajectory point(s) out of 2, as they occur before the current time.
First valid point will be reached in 0.013s.
[ INFO] [1551336690.667268099]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1551336690.667388163]: Execution completed: SUCCEEDED
Regards, Markus
You should always visually inspect the generated plan before executing on hardware. The computeCartesianPath functionality has a known issue that could result in joint flips.
thank you for the information. It is possible to solve or improve this problem?