Moving the robot to a new position 90 mm to the left
Can anyone help me with this i need to pickup some screws from the same places and each time i need to go pack 90 mm to the left. Bellow is my code planner.manualPose ("pose1",25.0) is the position i need to change every time the robot completes a circle.
If anyone can help would be appreciated, thank you!
#include <robot/ScanNPlan.h>
#include <iostream>
#include "std_msgs/MultiArrayLayout.h"
#include "std_msgs/MultiArrayDimension.h"
#include "std_msgs/Int32MultiArray.h"
#include "tf2_ros/transform_listener.h"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
int main(int argc, char **argv)
{
ros::init(argc, argv, "robot");
ros::AsyncSpinner async_spinner(1);
async_spinner.start();
ros::NodeHandle nh;
ros::NodeHandle private_node_handle ("~");
std::string base_frame;
private_node_handle.param<std::string>("base_frame", base_frame, "world");
ros::Publisher hand_control_pub = nh.advertise<std_msgs::Int32MultiArray>("hand_control", 100);
int array[] = {0,0,0,0};
std::vector<int> hand_target (array, array + sizeof(array) / sizeof(int) );
std_msgs::Int32MultiArray pub_msg;
ScanNPlan planner(nh, false);
ros::Duration(.5).sleep(); // wait for the class to initialize
ros::Rate loop_rate(1);
//-- The main loop
while (ros::ok()) {
planner.manualPose("pose1", 25.0);
planner.manualPose("pose2",10.0);
planner.manualPose("pose3", 25.0);
planner.manualPose("pose4",25.0);
planner.manualPose("pose5",25.0);
planner.manualPose("pose6",10.0);
planner.manualPose("pose7",25.0);
ros::spinOnce();
loop_rate.sleep();
}
ros::waitForShutdown();
}
I don't understand the question. "Please help" is not a good question. What exactly is the problem you have and what have you done to try to solve it?