42 return os <<
"\033[" <<
static_cast<int>(code) <<
"m";
54 ros::init(argc, argv,
"fanuc_post_processor_application");
75 fanuc_pp.
appendRun(
"MY_OTHER_TP_PROGRAM");
82 pose.
groups_.at(0).axis_.push_back(ext_axis);
85 std::vector<FanucAxis> axes;
90 pose.
groups_.push_back(group_positionner);
102 for (
unsigned i(0); i < 10; ++i)
104 pose.
move_type_ = FanucPose::MovementType::LINEAR;
110 Eigen::Isometry3d pose_1(Eigen::Isometry3d::Identity());
111 pose_1.translation() << 0.1, 0.2, 0;
113 pose.
groups_.at(0).user_frame_ = 2;
114 pose.
groups_.at(0).tool_frame_ = 6;
115 pose.
groups_.at(1).user_frame_ = 8;
116 pose.
groups_.at(1).tool_frame_ = 9;
120 pose.
move_type_ = FanucPose::MovementType::JOINT;
123 pose.
speed_type_ = FanucPose::SpeedType::PERCENTAGE;
126 Eigen::Isometry3d pose_2(Eigen::Isometry3d::Identity());
127 pose_2.translation() << 0.12, 0.1, 0.1;
129 pose.
groups_.at(0).user_frame_ = 1;
130 pose.
groups_.at(0).tool_frame_ = 1;
131 pose.
groups_.at(1).user_frame_ = 6;
132 pose.
groups_.at(1).tool_frame_ = 4;
138 pose_id.
move_type_ = FanucPose::MovementType::LINEAR;
140 pose_id.
speed_type_ = FanucPose::SpeedType::CM_MIN;
147 std::vector<std::pair<FanucPostProcessor::ProgramName, FanucPostProcessor::Program>> programs;
150 for (
unsigned i(0); i < programs.size(); ++i)
156 catch (std::runtime_error &e)
void appendGroupOutput(const unsigned id, const unsigned value)
void appendComment(const std::string comment)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void appendSetRegister(const unsigned r_id, const double value)
unsigned generatePrograms(std::vector< std::pair< ProgramName, Program >> &output_programs, const unsigned lines_per_program=0)
void appendPose(FanucPose &pose)
void appendPoseId(FanucPose &pose)
void appendJumpLabel(const unsigned id)
std::ostream & operator<<(std::ostream &os, Code code)
void appendLabel(const unsigned id)
std::vector< FanucGroup > groups_
void appendDigitalOutput(const unsigned digital_out_id, const bool state)
void setProgramName(std::string name)
int main(int argc, char **argv)
The main function.
void setRobotPose(const Eigen::Isometry3d &pose)
std::tuple< FlipNonFlip, Elbow, BackFront > Config
void appendDataMonitorStart(const unsigned id)
void setProgramComment(const std::string comment)
#define ROS_INFO_STREAM(args)
void setApplicative(const std::string appl)
void appendWait(const double time)
void appendUFrame(const unsigned uf_id)
void uploadToFtp(const std::vector< std::pair< ProgramName, Program >> programs, const std::string ip_address, const std::string port_number="21", const std::string username="", const std::string password="")
#define ROS_ERROR_STREAM(args)
void appendUTool(const unsigned ut_id)
void appendRun(const std::string program_name)
void appendDataMonitorStop()