当前位置: 首页 > news >正文

建站公司合同模板it类网站

建站公司合同模板,it类网站,网站验收技术指标,石家庄seo外包服务先浅浅的放一个官方的c文档#xff1a; Motion Planning API — moveit_tutorials Melodic documentation 目录 一、实现运动到目标点的程序 二、在rviz里面新建扫描平台 一、实现运动到目标点的程序 #xff08;等我得空了补一个c运行环境部署说明#xff09; #inclu…先浅浅的放一个官方的c文档 Motion Planning API — moveit_tutorials Melodic documentation 目录 一、实现运动到目标点的程序 二、在rviz里面新建扫描平台 一、实现运动到目标点的程序 等我得空了补一个c运行环境部署说明 #include moveit/move_group_interface/move_group_interface.h #include moveit/planning_scene_interface/planning_scene_interface.h#include moveit_msgs/DisplayRobotState.h #include moveit_msgs/DisplayTrajectory.h#include moveit_msgs/AttachedCollisionObject.h #include moveit_msgs/CollisionObject.h#include moveit_visual_tools/moveit_visual_tools.h#include motion_planning.h #include iostream #include math.h#include vector #include cmath #include Eigen/Dense#include fstream // #include inv_2.cppusing namespace Eigen;int main(int argc, char** argv) { //ros初始化需要的几行代码创建一个 ROS 节点Node并启动一个异步的 ROS spinner。 ros::init(argc, argv, move_group_interface_tutorial_zyw); ros::NodeHandle node_handle; ros::AsyncSpinner spinner(1); spinner.start();//这是我们操作的关节 static const std::string PLANNING_GROUP arm_group; moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP); // // 原始指针经常被用来指代计划组以改进性能 const robot_state::JointModelGroup* joint_model_group move_group.getCurrentState()-getJointModelGroup(PLANNING_GROUP); // 设置目标位置 geometry_msgs::Pose target_pose1; target_pose1.orientation.w 0.0654579; target_pose1.orientation.x 0.0654572; target_pose1.orientation.y 0.704072; target_pose1.orientation.z -0.704069; target_pose1.position.x 0.28; target_pose1.position.y -0.2; target_pose1.position.z 0.1; move_group.setPoseTarget(target_pose1); //plan moveit::planning_interface::MoveGroupInterface::Plan my_plan; bool success (move_group.plan(my_plan) moveit::planning_interface::MoveItErrorCode::SUCCESS); if (success) { //执行move_group.execute(my_plan); } else {ROS_WARN(Failed to plan and execute the trajectory.); }return 0;} 二、在rviz里面新建扫描平台 1.效果图 2.代码 ros::Publisher planning_scene_diff_publisher node_handle.advertisemoveit_msgs::PlanningScene(planning_scene, 1); ros::Rate loop_rate(10); while (ros::ok()){//创建一个物体moveit_msgs::CollisionObject collision_object;collision_object.header.frame_id move_group.getPlanningFrame();moveit::planning_interface::PlanningSceneInterface planning_scene_interface;// The id of the object is used to identify it.//id必须设置collision_object.id box1;// Define a box to add to the world.shape_msgs::SolidPrimitive primitive;primitive.type primitive.CYLINDER;primitive.dimensions.resize(2);//dimensions[0]控制高度的primitive.dimensions[0] 0.1;//dimensions[1]控制半径的primitive.dimensions[1] 0.1;// Define a pose for the box (specified relative to frame_id)geometry_msgs::Pose box_pose;box_pose.orientation.w 1.0;//圆柱中心点的距离box_pose.position.x 0.2;box_pose.position.y 0.2;box_pose.position.z 0.05;collision_object.primitives.push_back(primitive);collision_object.primitive_poses.push_back(box_pose);std::vectormoveit_msgs::CollisionObject collision_objects;collision_objects.push_back(collision_object);//定义操作为添加collision_object.operation collision_object.ADD;//定义一个PlanningScene消息moveit_msgs::PlanningScene planning_scene;planning_scene.world.collision_objects.push_back(collision_object);planning_scene.is_diff true;//发布该消息planning_scene_diff_publisher.publish(planning_scene);loop_rate.sleep();}3.代码的简单说明 这部分代码不包括机械臂的初始化和头文件的引用如果有小朋友不懂这个可以去看我在开头引入的官方文档官方文档给了你两个功能包moveit_tutorials和panda_moveit_config。你clone到本地打开在moveit_tutorials/doc/move_group_interface/src/move_group_interface_tutorial.cpp里面有机械臂的初始化代码然后你自己如过不会写cmakelist文件可以直接用moveit_tutorials的cmakelist文件当然你也可以直接用我在一里面写的代码只是物体的新建和主题的发布。物体的新建可以去看看shape_msgs::SolidPrimitive的官方文档里面有设置形状、位置等参数的说明。 shape_msgs/SolidPrimitive Documentation 4.参考文章 通过moveit在rviz中场景中创建和操控物体_rviz固定场景物体-CSDN博客
http://www.pierceye.com/news/282046/

相关文章:

  • 建设银行网站买手机阿里云已备案域名购买
  • 12个优秀的平面设计素材网站wordpress 标题 拼音
  • 瑶海区网站建设公司上海app开发定制公司
  • 北海建设厅网站局域网的电脑怎么做网站服务器
  • 莱芜网站建设价格域名注册成功后怎么使用网站
  • 衡阳县建设局网站wordpress 图片缓存
  • 浙江门户网站建设公司新闻稿发布
  • 温州网站建设排名wordpress 汉化失败
  • 做数据可视化的网站推广类软文案例
  • 外包做网站的要求怎么写做网站 360
  • 温州网站建设价格技术微信公众号免费开通
  • 做网站推广销售怎么样辽宁省网站备案系统
  • html公司网站模板源码企业信息填报系统
  • 有口碑的赣州网站建设微信开放社区
  • 外贸网站做SEO电脑浏览器打不开网页是什么原因
  • 做网站需要下载啥google建站推广
  • 沈阳哪里有教做网站的会做网站怎么赚钱
  • iis如何做同时运行两个网站80端口做汽车网站费用
  • 网站规划与设计一千字网红营销模式
  • 西安 域名空间网站制作淘宝客网站主题下载
  • 网页制作与网站建设pdf网站开发前端和后端工作
  • 网站设计教学西安免费企业网站模板图片
  • 吉林省住房和城乡建设厅网站官网手机百度app免费下载
  • 微信开放平台网站应用营销网站建设的规则
  • 网站制作语言有哪些对接标准做好门户网站建设
  • asp 公司网站源码贵州省建设厅的网站
  • 企业网站备案资料样本自建网站要多少钱
  • 女生做网站推广常用的网站推广方法
  • 营销型网站建设公司哪家建设开封做网站公司汉狮
  • 烟台专业网站建设seo实战培训教程