团队项目开发日志--(第三篇)

团队项目进度

1.根据头文件设计源文件

这几天基本上把源文件完善了一下:
1)该源文件主要是对机械手运动的目标点进行初始化和周期性的重置新值。

#include"RobotCommand.h"

using namespace IceHockeyGame;
using namespace RobotSubSystem;

RobotCommand::RobotCommand()
{
	
	this->targ_position_x = 0;
	this->targ_position_y = 0;
	this->targ_velocity_x = 0;
	this->targ_velocity_y = 0;
	this->targ_time = 0;
	
}

void RobotCommand::SetPosition(double x, double y)
{
	targ_position_x = x;
	targ_position_y = y;
}
void RobotCommand::SetVelocity(double x, double y)
{
	targ_velocity_x = x;
	targ_velocity_y = y;
}
void RobotCommand::SetTime(double time)
{
	targ_time = time;
}

2)该源文件主要是对机械手实时的位置进行反馈和进行机械手的插值运算。

#include"RobotSystem.h"
#include"RobotCommand.h"
#include"TrajectoryPlanning.h"
#include<iostream>

using namespace IceHockeyGame;
using namespace RobotSubSystem;
using namespace Robot;

TrajectoryPlan::TrajectoryPlan(){
	Acceleration_time_x = 0;
	Uniform_motion_time_x = 0;
	ActualAccelerration_x = 0;
	Acceleration_time_y = 0;
	Uniform_motion_time_y = 0;
	ActualAccelerration_y = 0;
}
TrajectoryPlan::TrajectoryPlan(double px, double py, double vx, double vy, bool request, bool done)
{
	position_x = px;
	position_y = py;
	velocity_x = vx;
	velocity_y = vy;
	Request = request;
	Done = done;
}

void TrajectoryPlan::InitTrajectoryPlan(double tpx, double tpy, double tvx, double tvy, double tt)
{
	targ_position_x = tpx;
	targ_position_y = tpy;
	targ_velocity_x = tvx;
	targ_velocity_y = tvy;
	targ_time = tt;
}

double TrajectoryPlan::GetPositionX(void)
{
	return position_x;
}
double TrajectoryPlan::GetPositionY(void)
{
	return position_y;
}
double TrajectoryPlan::GetVelocityX(void)
{
	return velocity_x;
}
double TrajectoryPlan::GetVelocityY(void)
{
	return velocity_y;
}
void TrajectoryPlan::Planning(void)//规划轨迹,算出速度加速度与对应时间
{

}
void TrajectoryPlan::LinearInterpolation()//计算插值
{

}

3)Planning(void)和LinearInterpolation()函数中的主要内容参考其他组员的博客。

posted @ 2017-01-07 23:18  shenghust  阅读(210)  评论(1编辑  收藏  举报