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

团队项目进度

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 @   shenghust  阅读(210)  评论(1编辑  收藏  举报
编辑推荐:
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
阅读排行:
· DeepSeek 解答了困扰我五年的技术问题。时代确实变了!
· PPT革命!DeepSeek+Kimi=N小时工作5分钟完成?
· What?废柴, 还在本地部署DeepSeek吗?Are you kidding?
· DeepSeek企业级部署实战指南:从服务器选型到Dify私有化落地
· 程序员转型AI:行业分析
点击右上角即可分享
微信分享提示