MATLAB轨迹规划 发给ROS中机器人实现仿真运动

2023-05-16

MATLAB轨迹规划 发给ROS中机器人实现仿真运动

现象如图所示:
在这里插入图片描述

0、matlab 与 ROS 通信:

https://blog.csdn.net/qq_40569926/article/details/112162871

 指定matlab路径:连接三句话
pe = pyenv('Version','D:\python2.7.18\python.exe');%多个python 版本可以用此指定
% 下面四行第一次运行时使用
rosshutdown
setenv('ROS_MASTER_URI','http://192.168.93.131:11311');
% setenv('ROS_IP','202.193.75.81');
%Starting ROS MASTER
rosinit();

当matlab多个版本的时候指定python的版本很重要:

pe = pyenv('Version','D:\python2.7.18\python.exe')
rosinit

1、一个轨迹点的运动:

%% 发送目标消息来移动机器人的手臂
%rosaction list 查看
%等待客户端连接到 ros 操作服务器
[rArm, rGoalMsg] = rosactionclient('/probot_elfin/arm_joint_controller/follow_joint_trajectory');
waitForServer(rArm);
% disp(rGoalMsg.Trajectory)
disp(rGoalMsg)
%ubuntu 通过 rosparam get /probot_elfin/arm_joint_controller/joints
%查看joints的名称
%设置机器人 joints的名称
rGoalMsg.Trajectory.JointNames={'elfin_joint1', ...
                                'elfin_joint2', ...
                                'elfin_joint3', ...
                                'elfin_joint4',...
                                'elfin_joint5',...
                                'elfin_joint6'};
% 通过创建 rostrajectory_msgs/JointTrajectoryPoint
% 消息并指定所有7个关节的位置和速度作为矢量, 在臂关节轨迹中创建设定值。将开始时的时间指定为 ros 持续时间对象。
% Point 1
tjPoint1 = rosmessage('trajectory_msgs/JointTrajectoryPoint');
tjPoint1.Positions = zeros(1,6);%六个关节位置都为0
tjPoint1.Velocities = zeros(1,6);%速度位1
tjPoint1.Accelerations=zeros(1,6);%加速度1
tjPoint1.TimeFromStart = rosduration(1.0);
% Point 2
tjPoint2 = rosmessage('trajectory_msgs/JointTrajectoryPoint');
tjPoint2.Positions = [-1.0 0.2 0.1 -1.2 -1.5 -0.3];%六个关节位置
tjPoint2.Velocities = zeros(1,6);
tjPoint2.Accelerations=zeros(1,6);
tjPoint2.TimeFromStart = rosduration(2.0);
rGoalMsg.Trajectory.Points = [tjPoint1,tjPoint2]; %手臂轨迹点从Point1到Point2
sendGoalAndWait(rArm,rGoalMsg); % 发送消息后右臂移动

2、acro 变换为 urdf 模型:

acro 变换为 urdf 模型 这个在Ubuntu 中进行操作:

rosrun xacro xacro elfin10.urdf.xacro > elfin10.urdf --inorder

3、导入URDF 模型后获取机器人的转态:

elfin3 = importrobot('E:\MATLAB_MIN\ROS_MATLAB\elfin_description\urdf\elfin5.urdf');
% % show(elfin3);
% % showdetails(elfin3);
% %% 获取机器人手臂的状态
% 创建一个订阅者, 从机器人中获取关节状态。
jointSub = rossubscriber('joint_states');
% % % 获取当前的联合状态消息。
jntState = receive(jointSub);
% % 将联合状态从联合状态消息分配到机器人所理解的配置结构的字段。
jntPos =JointMsgToStruct(elfin3,jntState);
% 显示状态

%% 可视化当前机器人配置(从虚拟机得到当前的机器人状态,用Show可视化)
show(elfin3,jntPos);

如图所示:
在这里插入图片描述

4、创建对象并定义位姿

%% 创建InverseKinematics对象:
ik = robotics.InverseKinematics('RigidBodyTree', elfin3);
%% 禁用随机重新启动以确保安全解决方案一致:
ik.SolverParameters.AllowRandomRestart = false;
%% 为目标姿势的每个组件上的公差指定权重。 
weights = [1 1 1 1 1 1];
initialGuess = jntPos; % current jnt pos as initial guess
endEffectorName = 'elfin_end_link';% 末端的link
%% 指定与任务相关的末端效应器姿势。
% 没有末端执行器 忽略
% % % % 指定末端执行器的名称。
% % % endEffectorName = 'r_gripper_tool_frame';
% % % % 指定罐的初始 (当前) 姿势和所需的最终姿势。
% % % TCanInitial = trvec2tform([0.7, 0.0, 0.55]);
% % % TCanFinal = trvec2tform([0.6, -0.5, 0.55]);
% % % % 定义抓取时端部效应器和罐之间所需的相对变换。
% % % TGraspToCan = trvec2tform([0,0,0.08])*eul2tform([pi/8,0,-pi]);
%% 按照特定轨迹进行运动
% 建立运动学模型
% elfin=robot('elfin');
% 机器人初始位姿
xoy = [0.1845   0.03631     0.353 ]; %位置
rpy = [0 pi/2 0];  %姿态
home = [0.266 0 0.7015];
start_home = home;
end_home =  xoy;
%定义位姿
shome_T = trvec2tform(start_home);
end_T =   trvec2tform(end_home)*eul2tform(rpy);
Tf=end_T;

5、轨迹规划

%% 执行动作
% 获取当前的联合状态
    jntState = receive(jointSub);
    jntPos = JointMsgToStruct(elfin3,jntState);
    
    % 获取末端的T0
    T0 = getTransform(elfin3,jntPos,endEffectorName);
    %在关键航路点之间进行插值的百分比
    numWaypoints = 10;%插值个数
    t = [0 1];
    [s,sd,sdd,tvec] = trapveltraj(t,numWaypoints,'AccelTime',0.4);%相对缓慢
    TWaypoints = transformtraj(T0, Tf, [0 1], tvec, 'TimeScaling', [s; sd; sdd]); % end-effector pose waypoints
     % joint position waypoints
    jntPosWaypoints = repmat(initialGuess, numWaypoints, 1);  
    
    %使用IK为k = 1:numWaypoints计算每个末端执行器姿势航路点的关节位置
    rArmJointNames = rGoalMsg.Trajectory.JointNames;
    rArmJntPosWaypoints = zeros(numWaypoints, numel(rArmJointNames));
   
    % Calculate joint position for each end-effector pose waypoint using IK
    for k = 1:numWaypoints
    jntPos  = ik(endEffectorName, TWaypoints(:,:,k), weights, initialGuess);
    jntPosWaypoints(k,:)  = jntPos ;
    initialGuess = jntPos ;
    % Extract right arm joint positions from jntPos
        rArmJointPos = zeros(size(rArmJointNames));
       for n = 1:length(rArmJointNames)
            rn = rArmJointNames{n};
            idx = strcmp({jntPos.JointName}, rn);
            rArmJointPos(n) = jntPos(idx).JointPosition;
        end  
       rArmJntPosWaypoints(k,:) = rArmJointPos';
     end
    
    % Time points corresponding to each waypoint
    timePoints = linspace(0,3,numWaypoints); 
    % Estimate joint velocity trajectory numerically
    h = diff(timePoints); h = h(1);
    [~, rArmJntVelWaypoints] = gradient(rArmJntPosWaypoints, h);

6、轨迹发送

 %更新轨迹点
    jntTrajectoryPoints = arrayfun(@(~) rosmessage('trajectory_msgs/JointTrajectoryPoint'), zeros(1,numWaypoints)); 
    %     jntTrajectoryPoints = repmat(rosmessage('trajectory_msgs/JointTrajectoryPoint'),1,numWaypoints);
    A = jntTrajectoryPoints.Positions;
    for m = 1:numWaypoints
           
          jntTrajectoryPoints(m).Positions = rArmJntPosWaypoints(m,:);
          jntTrajectoryPoints(m).Velocities = rArmJntVelWaypoints(m,:);
          jntTrajectoryPoints(m).TimeFromStart = rosduration(timePoints(m));
    end
    
    % Visualize robot motion and end-effector trajectory in MATLAB(R)
    hold on
%     for j = 1:numWaypoints
%         show(elfin3, jntPosWaypoints(j,:),'PreservePlot', false);
%         ShowEndEffectorPos(TWaypoints(:,:,j));
%         drawnow;
%         pause(0.1);
%     end
    % Send the right arm trajectory to the robot
    rGoalMsg.Trajectory.Points = jntTrajectoryPoints;
    disp(rGoalMsg.Trajectory)
    sendGoalAndWait(rArm, rGoalMsg);

8、完整代码:

% clear
clc
% 指定matlab路径:连接三句话
% pe = pyenv('Version','D:\python2.7.18\python.exe');
% % setenv('ROS_MASTER_URI','http://202.193.75.81:11311')
% % rosinit
% % Setting ROS_MASTER_URI
% % 下面四行第一次运行时使用
% rosshutdown
% setenv('ROS_MASTER_URI','http://192.168.93.131:11311');
% % setenv('ROS_IP','202.193.75.81');
% %Starting ROS MASTER
% rosinit();

%% 发送目标消息来移动机器人的手臂
%rosaction list 查看
%等待客户端连接到 ros 操作服务器
[rArm, rGoalMsg] = rosactionclient('/probot_elfin/arm_joint_controller/follow_joint_trajectory');
waitForServer(rArm);
% disp(rGoalMsg.Trajectory)
% disp(rGoalMsg)
%ubuntu 通过 rosparam get /probot_elfin/arm_joint_controller/joints
%查看joints的名称
%设置机器人 joints的名称
rGoalMsg.Trajectory.JointNames={'elfin_joint1', ...
                                'elfin_joint2', ...
                                'elfin_joint3', ...
                                'elfin_joint4',...
                                'elfin_joint5',...
                                'elfin_joint6'};
% % 通过创建 rostrajectory_msgs/JointTrajectoryPoint
% % 消息并指定所有7个关节的位置和速度作为矢量, 在臂关节轨迹中创建设定值。将开始时的时间指定为 ros 持续时间对象。
% % Point 1
% tjPoint1 = rosmessage('trajectory_msgs/JointTrajectoryPoint');
% tjPoint1.Positions = zeros(1,6);%六个关节位置都为0
% tjPoint1.Velocities = zeros(1,6);%速度位1
% tjPoint1.Accelerations=zeros(1,6);%加速度1
% tjPoint1.TimeFromStart = rosduration(1.0);
% % Point 2
% tjPoint2 = rosmessage('trajectory_msgs/JointTrajectoryPoint');
% tjPoint2.Positions = [-1.0 0.2 0.1 -1.2 -1.5 -0.3];%六个关节位置
% tjPoint2.Velocities = zeros(1,6);
% tjPoint2.Accelerations=zeros(1,6);
% tjPoint2.TimeFromStart = rosduration(2.0);
% rGoalMsg.Trajectory.Points = [tjPoint1,tjPoint2]; %手臂轨迹点从Point1到Point2
% sendGoalAndWait(rArm,rGoalMsg); % 发送消息后右臂移动

%% acro 变换为 urdf 模型
% rosrun xacro xacro elfin10.urdf.xacro > elfin10.urdf --inorder
%% matlab 导入机器人urdf 模型
% elfin3 = importrobot('E:\MATLAB_MIN\ROS_MATLAB\elfin_description\urdf\elfin5.urdf');
% % show(elfin3);
% % showdetails(elfin3);
% %% 获取机器人手臂的状态
% 创建一个订阅者, 从机器人中获取关节状态。
jointSub = rossubscriber('joint_states');
% % % 获取当前的联合状态消息。
jntState = receive(jointSub);
% % 将联合状态从联合状态消息分配到机器人所理解的配置结构的字段。
jntPos =JointMsgToStruct(elfin3,jntState);
% 显示状态

%% 可视化当前机器人配置(从虚拟机得到当前的机器人状态,用Show可视化)
% show(elfin3,jntPos);
%% 创建robotics.InverseKinematics pr2机器人对象的逆变运动学对象。
% 逆运动学的目的是计算 pr2 臂的关节角度, 将夹持器 (即末端执行器) 置于所需的姿势。
% 在一段时间内, 一系列的末端效应器被称为轨迹。
% 因此, 在规划过程中, 我们对抬起关节设置了严格的限制。
% 没有抬起关节不需要
% torsoJoint = elfin3.getBody('elfin_link4').Joint
% idx = strcmp({jntPos.JointName}, torsoJoint.Name);
% torsoJoint.HomePosition = jntPos(idx).JointPosition;
% torsoJoint.PositionLimits = jntPos(idx).JointPosition + [-1e-3,1e-3];
%% 创建InverseKinematics对象:
ik = robotics.InverseKinematics('RigidBodyTree', elfin3);
%% 禁用随机重新启动以确保安全解决方案一致:
ik.SolverParameters.AllowRandomRestart = false;
%% 为目标姿势的每个组件上的公差指定权重。 
weights = [1 1 1 1 1 1];
initialGuess = jntPos; % current jnt pos as initial guess
endEffectorName = 'elfin_end_link';% 末端的link
%% 指定与任务相关的末端效应器姿势。
% 没有末端执行器 忽略
% % % % 指定末端执行器的名称。
% % % endEffectorName = 'r_gripper_tool_frame';
% % % % 指定罐的初始 (当前) 姿势和所需的最终姿势。
% % % TCanInitial = trvec2tform([0.7, 0.0, 0.55]);
% % % TCanFinal = trvec2tform([0.6, -0.5, 0.55]);
% % % % 定义抓取时端部效应器和罐之间所需的相对变换。
% % % TGraspToCan = trvec2tform([0,0,0.08])*eul2tform([pi/8,0,-pi]);
%% 按照特定轨迹进行运动
% 建立运动学模型
% elfin=robot('elfin');
% 机器人初始位姿
xoy = [0.1845   0.03631     0.353 ]; %位置
rpy = [0 pi/2 0];  %姿态
home = [0.266 0 0.7015];
start_home = home;
end_home =  xoy;
%定义位姿
shome_T = trvec2tform(start_home);
end_T =   trvec2tform(end_home)*eul2tform(rpy);
Tf=end_T;
%% 执行动作
% 获取当前的联合状态
    jntState = receive(jointSub);
    jntPos = JointMsgToStruct(elfin3,jntState);
    
    % 获取末端的T0
    T0 = getTransform(elfin3,jntPos,endEffectorName);
    %在关键航路点之间进行插值的百分比
    numWaypoints = 10;%插值个数
    t = [0 1];
    [s,sd,sdd,tvec] = trapveltraj(t,numWaypoints,'AccelTime',0.4);%相对缓慢
    TWaypoints = transformtraj(T0, Tf, [0 1], tvec, 'TimeScaling', [s; sd; sdd]); % end-effector pose waypoints
     % joint position waypoints
    jntPosWaypoints = repmat(initialGuess, numWaypoints, 1);  
    
    %使用IK为k = 1:numWaypoints计算每个末端执行器姿势航路点的关节位置
    rArmJointNames = rGoalMsg.Trajectory.JointNames;
    rArmJntPosWaypoints = zeros(numWaypoints, numel(rArmJointNames));
   
    % Calculate joint position for each end-effector pose waypoint using IK
    for k = 1:numWaypoints
    jntPos  = ik(endEffectorName, TWaypoints(:,:,k), weights, initialGuess);
    jntPosWaypoints(k,:)  = jntPos ;
    initialGuess = jntPos ;
    % Extract right arm joint positions from jntPos
        rArmJointPos = zeros(size(rArmJointNames));
       for n = 1:length(rArmJointNames)
            rn = rArmJointNames{n};
            idx = strcmp({jntPos.JointName}, rn);
            rArmJointPos(n) = jntPos(idx).JointPosition;
        end  
       rArmJntPosWaypoints(k,:) = rArmJointPos';
     end
    
    % Time points corresponding to each waypoint
    timePoints = linspace(0,3,numWaypoints); 
    % Estimate joint velocity trajectory numerically
    h = diff(timePoints); h = h(1);
    [~, rArmJntVelWaypoints] = gradient(rArmJntPosWaypoints, h);
    %更新轨迹点
    jntTrajectoryPoints = arrayfun(@(~) rosmessage('trajectory_msgs/JointTrajectoryPoint'), zeros(1,numWaypoints)); 
    %     jntTrajectoryPoints = repmat(rosmessage('trajectory_msgs/JointTrajectoryPoint'),1,numWaypoints);
    A = jntTrajectoryPoints.Positions;
    for m = 1:numWaypoints
           
          jntTrajectoryPoints(m).Positions = rArmJntPosWaypoints(m,:);
          jntTrajectoryPoints(m).Velocities = rArmJntVelWaypoints(m,:);
          jntTrajectoryPoints(m).TimeFromStart = rosduration(timePoints(m));
    end
    
    % Visualize robot motion and end-effector trajectory in MATLAB(R)
    hold on
%     for j = 1:numWaypoints
%         show(elfin3, jntPosWaypoints(j,:),'PreservePlot', false);
%         ShowEndEffectorPos(TWaypoints(:,:,j));
%         drawnow;
%         pause(0.1);
%     end
    % Send the right arm trajectory to the robot
    rGoalMsg.Trajectory.Points = jntTrajectoryPoints;
    disp(rGoalMsg.Trajectory)
    sendGoalAndWait(rArm, rGoalMsg);                         
                               

9、几个函数

ShowEndEffectorPos

function ShowEndEffectorPos( T )
%EXAMPLEHELPERSHOWENDEFFECTORPOS Plot end-effector position

% Copyright 2016 The MathWorks, Inc.

s = 0.005;
[X0,Y0,Z0]=sphere;

X = s*X0 + T(1,4);
Y = s*Y0 + T(2,4);
Z = s*Z0 + T(3,4);
surf(X, Y, Z, 'facecolor','r', 'linestyle','none');

end

JointMsgToStruct

function jntPos = JointMsgToStruct(robot,jntState)
%   exampleHelperJointMsgToStruct The order of body names in the received 
%   jntState message is different from that the pr2 model in MATLAB would
%   expect. This function is to provide a convenient conversion.

% Copyright 2016 The MathWorks, Inc.

jntPos = robot.homeConfiguration;
% 根据jntState.Name的实际个数改正
for i = 1:length(jntState.Name)-1
    idx = strcmp({jntPos.JointName}, jntState.Name{i});
    jntPos(idx).JointPosition = jntState.Position(i);
end

for i = 1:robot.NumBodies
    joint = robot.Bodies{i}.Joint;
    if ~strcmp(joint.Type,'fixed')
        idx = strcmp({jntPos.JointName}, joint.Name);
        jntPos(idx).JointPosition = max(min(jntPos(idx).JointPosition, joint.PositionLimits(2)), joint.PositionLimits(1));
    end
end
end

例子:
https://download.csdn.net/download/qq_40569926/18233484

10、博客内容主要来源 mathwork 官网:

https://www.mathworks.com/help/robotics/ug/control-pr2-arm-movements-using-actions-and-ik.html#PR2ManipulationExample-5

https://blog.csdn.net/weixin_39090239/article/details/84378770

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

MATLAB轨迹规划 发给ROS中机器人实现仿真运动 的相关文章

  • Django rest-framework类视图大全

    视图分类 视图类 GenericAPIView xff1a 包含两大视图类 xff08 APIView GenericAPIView xff09 视图工具类 mixins xff1a 包含五大工具类 xff0c 六大工具方法工具视图类 ge
  • JS中? ?和??=和?.和 ||的区别

    undefined和null是两个比较特殊的数据类型 是不能用点操作符去访问属性的 xff0c 否则将会报错 let a console log a name undefined console log a name 报错 let obj
  • 几款好用的串口和网络调试助手

    和嵌入式厮混在一起总得用几个趁手的调试助手 xff0c 这里介绍几个用过的串口和网络调试助手 xff0c 各有千秋 这也只是我自己使用过的 xff0c 如果又更好 xff0c 也请大家分享一下 xff1a 1 丁丁串口调试助手 这是我最常用
  • 软件设计工程——结构化分析与设计

    结构化分析方法 数据流图 便于用户理解 分析系统数据流程的图形工具 基本图形元素 数据流 xff1a 由固定成分的数据组成 xff0c 表示数据的流向 xff1b 加工 xff1a 描述输入数据流到输出数据流之间的变换 xff1b 数据存储
  • Java面试:接口(Interface)与抽象类(Abstract Class)的区别?

    什么是抽象类 xff1f 包含抽象方法的类 xff0c 是对一系列看上去不同 xff0c 但是本质上相同的具体概念的抽象 抽象类的作用 xff1f 用于拓展对象的行为功能 xff0c 一个抽象类可以有任意个可能的具体实现方式 抽象方法是一种
  • 解决Win10/11有线网(包括校园网)频繁掉线问题

    我连的是校园有线网 xff0c 但以下方法应该能够同时解决wifi出现频繁断连 默认网关不可用的问题 从去年开始我的电脑就有校园网断开的问题 xff0c 但不频繁 xff0c 当时没太在意 xff0c 但今年开学这个问题忽然严重 xff0c
  • python数据分析-Mysql8.0版本用sqlyog连接1251错误解决

    用sqlyog连接8 0 23版本的mysql发生1251错误 下载8 0版本的mysql时候发现最好直接下载 msi的安装文件 xff0c 方便许多 xff0c 好 xff0c 接下来说问题 因为之前装的是5 5版本的 xff0c 但是t
  • 怎么在android中创建raw文件

    怎么在android中创建raw文件 标题 1 2 3 这样即可以
  • form表单中把星号*去掉

    只需要把required true去掉就好了 关于表单验证中会有许多的细节问题需要注意 写法有很多种 注意格式 还有一点 xff0c 如果验证方法是写在行内 xff0c 那么他的方法需要在methods种写
  • 移动端开发的vconsole插件

    vConsole A lightweight extendable front end developer tool for mobile web page 一个轻量级 可扩展的移动网页前端开发工具 是腾讯的一个开源工具 功能 xff1a
  • vite打包工具的介绍

    vite Vite是Vue的作者尤雨溪开发的Web开发构建工具 xff0c 它是一个基于浏览器原生ES模块导入的开发服务器 xff0c 在开发环境下 xff0c 利用浏览器去解析import xff0c 在服务器端按需编译返回 xff0c
  • 初步了解win32界面库DuiLib

    DuiLib是一个开源win32界面库 xff1b 下载地址 xff1a https github com duilib duilib 可以做类似一些杀毒软件的界面 xff1b 效果还是比较好 xff1b 先下载一个demo看一下 xff1
  • this指向 js作用域链

    this 指向 xff5c 作用域与闭包 实战是检验真理的唯一标准深入理解 this作用域闭包到底是什么 this 问题总结 这里将以实战为引子 xff0c 带领大家一起总结出 this 指向问题的规律 默认绑定 xff08 函数直接调用
  • css中zoom和scale

    css中我们常用来缩放的样式元素是transform scale xff1b 也还有我们不熟悉的zoom xff0c 在实际的应用场景中 xff0c 我们需要根据自身项目的需要 xff0c 结合不同的解决方案的优缺点来选择适合我们项目解决方
  • 客户端存储和http缓存

    通过本文学习 xff0c 将获得以下知识 xff1a 1 web 端存储有哪些方式 2 不同存储之间的区别 xff0c 以及使用场景 3 http缓存有哪些策略 web 存储的由来 为什么需要 web 存储呢 xff0c 也就是客户端存储
  • 将React 类组件转换成 函数式组件

    将React 类组件转换成 函数式组件 步骤 xff1a 将class 类定义的React 元素转换成 变量或者函数class 中的 render 函数 直接去掉 xff0c 直接return html 元素将 state 变量使用 use
  • IndexedDB 数据库的使用

    前端的存储方式 前端的存储 xff0c 可以使得页面交互更加友好 xff0c 特别是在保存草稿 xff0c 网络差的情况下对用户来说是很有用的 前端的存储方式有多种 xff0c 像 Local storage Session storage
  • typedef的使用

    typedef的使用 1 为基本数据类型定义新的类型名 typedef double MYDBL 2 为自定义类型 xff08 结构体 共用体和枚举 xff09 起别名 简化类型名关键字 span class token keyword t
  • 解决Vscode每次连接ssh登入需要输入密码问题(免密登入)

    提示 xff1a 解决Vscode每次连接ssh登入需要输入密码问题 xff08 免密登入 xff09 文章目录 问题一 解决方案二 使用步骤1 win10操作 参考文献 问题 可以看到每次登入 xff0c 或者切换的时候都需要输入密码 x
  • 《Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering》——2018 CVPR论文笔记

    这是一篇2018 年的 CVPR 的论文 xff0c 使用自下而上和自上而下相结合的注意力机制实现了image captioning和 VQA xff0c 作者使用这个注意力模型在image captioning上取得了非常好的效果 xff

随机推荐

  • Arduino Esp8266 UDP通信

    使用2个WeMos D1mini通过UDP通信实现传输字符串类 WeMos D1 Mini 基于Esp8266的开发板 用Arduino Ide 43 安卓线即可实现程序编译烧录 非常适合于物联网 通信等方面 UDP通信 UDP通信很近似于
  • ROS学习笔记#4 ros节点介绍&常见的rosnode命令

    ros节点 xff1a 是运行计算的过程 xff0c 所有的节点都包含在一张图中 xff08 rqt graph可以查看 xff09 xff0c 通过话题流 xff0c RPC服务和参数服务器彼此进行通信 xff0c 1个机器人控制系统包含
  • MFC CArray类的基本使用

    CArray 类 支持类似于 C 数组的数组 xff0c 但可以根据需要动态减小和增大 语法 template lt class TYPE class ARG TYPE 61 const TYPE amp gt class CArray p
  • 树莓派4B上手教程 2.SSH安装及相关设置

    SSH简介 SSH是一种网络协议 xff0c 用于计算机之间的加密登录 如果一个用户从本地计算机 xff0c 使用SSH协议登录另一台远程计算机 xff0c 我们就可以认为 xff0c 这种登录是安全的 xff0c 即使被中途截获 xff0
  • Ubuntu4B上手教程 3.5如何关闭虚拟桌面

    暑假马上要完事了 树莓派也跟着我要换网络环境 现在的树莓派 虽说插上电就能用 但是也得是同一局域网下 到学校wifi就换了 不知道怎么在ssh和vnc都用不了的情况下让树莓派连接新的WiFi 于是今天想着把虚拟桌面先关掉它 学校起码有显示器
  • 树莓派4B上手教程 4.ROS2不换源安装

    安装ROS对于大多数人来说是一个比较不好的回忆 再难受也得一步一步来啊 不多说了 分享一下我安装ROS2的一些经验 安装环境 我的安装环境是树莓派4B 烧的Ubuntu22 04LTS桌面版镜像 对应的ROS版本是ros2 humble 安
  • 苹果输入法自动合并两个短横线/减号的解决方法

    最近在学MD的时候学到了表格 xff0c 怎么打都打不出来 仔细一看发现在连着打两个横线的时候 xff0c 他合到了一起了 解决方法 设置 通用 键盘 智能标点 Off 问题解决
  • (一篇绝杀)考研英语二阅读题型与技巧总结

    目录 题型一 xff1a 词汇 短语 句子题 xff08 indicate xff09 题型二 xff1a 推断题 xff08 inferred implicit indicate xff09 题型三 xff1a 判断题 xff08 EXC
  • Cache 和 Buffer 都是缓存,主要区别是什么?

    提到这个问题 xff0c 可能意味着你意识到了两者的相关性 的确 xff0c 他们确实有那么一些联系 首先cache是缓存 xff0c buffer是缓冲 xff0c 虽然翻译有那么一个字的不同 xff0c 但这不是重点 个人认为他们最直观
  • C++课后练习

    题目需求 xff1a 编写一个程序 xff0c 它要求用户首先输入其名 xff0c 再输入其姓 然后程序使用一个逗号和空格组合起来 xff0c 并存储和显示组合结果 请使用char数组和头文件cstring 中的函数 xff0c 下面是该程
  • 像睿智一样简单地使用 Shiro

    加我微信索要我正在使用的 Apacher Shiro参考手册中文版学习 pdf 我们一起学习吧 Apache Shiro 中文文档 Apache Shiro 教程 Docs4dev Apache Shiro 是一个功能强大且易于使用的 Ja
  • Zookeeper 安装

    单机版 1 下载 tar gz 2 解压到 usr local zookeeper 下 3 在任何地方 xff08 我是在zookeeper bin 同级下 xff09 创建一个data文件夹 xff0c 用于存放运行时缓存数据 4 在 c
  • 【推荐系统算法之多任务学习】

    推荐系统算法之多任务学习 引言多任务学习设计思路ESMM模型实验 MMOE模型 引言 本文主要是在组队学习 xff0c pytorch复习推荐模型课程中 xff0c 学习课程笔记进行的总结 多任务学习 多任务学习是指模型在同一时间可以学习多
  • Idea快捷键

    1 进入 返回方法快捷键 Ctrl 43 B 进入光标所在方法定义的地方或返回该方法被使用的地方 xff08 代替Ctrl 43 鼠标点击方法进入方式 xff0c 避免了手指在键盘和鼠标之间切换 xff0c 非常好用的快捷键 xff09 C
  • ASP.NET C# 获取当前日期 时间 年 月 日 时 分 秒

    转贴 xff09 在 ASP net c 中 我们可以通过使用DataTime这个类来获取当前的时间 通过调用类中的各种方法我们可以获取不同的时间 xff1a 如 xff1a 日期 xff08 2008 09 04 xff09 时间 xff
  • ASP.NET中的几种弹出框提示基本方法

    NET程序的开发过程中 xff0c 常常需要和用户进行信息交互 xff0c 对话框的出现将解决了这些问题 xff0c 下面是本人对常用对话框使用的小结 xff0c 希望对大家有所帮助 我们在 NET程序的开发过程中 xff0c 常常需要和用
  • 单链表的就地逆置(头插,就地,递归)

    http blog csdn net lycnjupt article details 47103433 https blog csdn net v xchen v article details 53067448 单链表的就地逆置是指辅助
  • Panads(四):数据清洗——对缺失值的处理

    文章目录 一 处理缺失值的四个函数二 使用1 1 数据样子1 2 处理 一 处理缺失值的四个函数 isnull函数 xff1a 检测是否是空值 xff0c 可用于df和series notnull函数 xff1a 检测是否是空值 xff0c
  • 单片机数字钟(调时,调时闪烁,万年历,年月日)超详细解析

    2019 07 13 单片机数字钟 xff08 调时 xff0c 调时闪烁 xff0c 万年历 xff0c 年月日 xff09 超详细解析 发表日期 xff1a 2019 07 13 单片机开发板 xff1a 巫妖王2 0 xff0c 使用
  • MATLAB轨迹规划 发给ROS中机器人实现仿真运动

    MATLAB轨迹规划 发给ROS中机器人实现仿真运动 现象如图所示 xff1a 0 matlab 与 ROS 通信 xff1a https blog csdn net qq 40569926 article details 11216287