The Cartesian coordinate system is the collective name for the Cartesian coordinate system and the oblique coordinate system. A Cartesian path is actually a line connecting any two points in space.
Start up MoveIT
roslaunch dofbot_config demo.launch
Start Cartesian path code
xxxxxxxxxx
rosrun dofbot_moveit 04_cartesian
To view the trajectory, you need to add the [MarkerArray] plug-in and select the [/rviz_visual_tools] topic.
Set a specific location
x
ROS_INFO("Set Init Pose.");
//Set specific location
vector<double> pose{0, -0.69, -0.17, 0.86, 0};
yahboomcar.setJointValueTarget(pose);
Add waypoint
x
//Initialize path point vector
std::vector<geometry_msgs::Pose> waypoints;
//Add initial pose to waypoint list
waypoints.push_back(start_pose);
start_pose.position.x -= 0.04;
waypoints.push_back(start_pose);
start_pose.position.z -= 0.02;
waypoints.push_back(start_pose);
start_pose.position.x += 0.04;
waypoints.push_back(start_pose);
start_pose.position.z -= 0.02;
waypoints.push_back(start_pose);
start_pose.position.x += 0.03;
waypoints.push_back(start_pose);
Waypoint planning
xxxxxxxxxx
fraction = yahboomcar.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory);