资源简介
这是《ROS机器人程序设计》(英文名Learing ORfor Robotics Programming)的用到的例程的所有源代码。本人辛苦从作者网站上祈求过来的。造福懒人,不用自己敲代码!
代码片段和文件信息
#include
#include
#include
#include
#include
#include
namespace rosbook_arm_hardware_gazebo
{
using namespace hardware_interface;
ROSBookArmHardwareGazebo::ROSBookArmHardwareGazebo()
: gazebo_ros_control::RobotHWSim()
{}
bool ROSBookArmHardwareGazebo::initSim(const std::string& robot_namespace
ros::NodeHandle nh
gazebo::physics::ModelPtr model
const urdf::Model* const urdf_model
std::vector transmissions)
{
using gazebo::physics::JointPtr;
// Cleanup
sim_joints_.clear();
jnt_pos_.clear();
jnt_vel_.clear();
jnt_eff_.clear();
jnt_pos_cmd_.clear();
// Simulation joints
sim_joints_ = model->GetJoints();
n_dof_ = sim_joints_.size();
std::vector jnt_names;
for (size_t i = 0; i < n_dof_; ++i)
{
jnt_names.push_back(sim_joints_[i]->GetName());
}
// Raw data
jnt_pos_.resize(n_dof_);
jnt_vel_.resize(n_dof_);
jnt_eff_.resize(n_dof_);
jnt_pos_cmd_.resize(n_dof_);
// Hardware interfaces
for (size_t i = 0; i < n_dof_; ++i)
{
jnt_state_interface_.registerHandle(
JointStateHandle(jnt_names[i] &jnt_pos_[i] &jnt_vel_[i] &jnt_eff_[i]));
jnt_pos_cmd_interface_.registerHandle(
JointHandle(jnt_state_interface_.getHandle(jnt_names[i]) &jnt_pos_cmd_[i]));
ROS_DEBUG_STREAM(“Registered joint ‘“ << jnt_names[i] << “‘ in the PositionJointInterface.“);
}
registerInterface(&jnt_state_interface_);
registerInterface(&jnt_pos_cmd_interface_);
// Position joint limits interface
std::vector cmd_handle_names = jnt_pos_cmd_interface_.getNames();
for (size_t i = 0; i < n_dof_; ++i)
{
const std::string name = cmd_handle_names[i];
JointHandle cmd_handle = jnt_pos_cmd_interface_.getHandle(name);
using namespace joint_limits_interface;
boost::shared_ptr urdf_joint = urdf_model->getJoint(name);
JointLimits limits;
SoftJointLimits soft_limits;
if (!getJointLimits(urdf_joint limits) || !getSoftJointLimits(urdf_joint soft_limits))
{
ROS_WARN_STREAM(“Joint limits won‘t be enforced for joint ‘“ << name << “‘.“);
}
else
{
jnt_limits_interface_.registerHandle(
PositionJointSoftLimitsHandle(cmd_handle limits soft_limits));
ROS_DEBUG_STREAM(“Joint limits will be enforced for joint ‘“ << name << “‘.“);
}
}
// PID controllers
pids_.resize(n_dof_);
for (size_t i = 0; i < n_dof_; ++i)
{
ros::NodeHandle joint_nh(nh “gains/“ + jnt_names[i]);
if (!pids_[i].init(joint_nh))
{
return false;
}
}
return
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\
文件 2498 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\README.md
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\
文件 1523 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\LICENSE
文件 1798 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\README.md
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\chapter10_tutorials\
文件 118 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\chapter10_tutorials\CMakeLists.txt
文件 564 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\chapter10_tutorials\package.xm
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\images\
文件 146480 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\images\rosbook_arm_moveit.png
文件 116044 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\images\rosbook_arm_moveit_no_controllers.png
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\
文件 251 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\CMakeLists.txt
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\config\
文件 213 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\config\approach_planner.yaml
文件 832 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\config\rosbook_arm_motions.yaml
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\launch\
文件 366 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\launch\play_motion.launch
文件 615 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\launch\rosbook_arm_bringup.launch
文件 657 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_bringup\package.xm
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration\
文件 261 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration\CMakeLists.txt
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration\launch\
文件 366 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration\launch\default_controllers.launch
文件 585 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration\package.xm
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\
文件 268 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\CMakeLists.txt
目录 0 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\config\
文件 933 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\config\joint_trajectory_controllers.yaml
文件 569 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\config\pids.yaml
文件 462 2017-02-22 15:09 Learning_ROS_for_Robotics_Programming_2nd_edition-hydro-devel\chapter10_tutorials\rosbook_arm_controller_configuration_gazebo\package.xm
............此处省略384个文件信息
相关资源
- wifi电路调试经验之谈
- Oxford Industries 采用 Microsoft.NET 平台实
- IBM CAW for Microsoft Cluster Server 简介
- IBM.Rational.Rose.Enterprise的license.upd
- Symantec AntiVirus for Microsoft SharePoint产品
- pppd2.4.7源代码以及拨号脚本
- 酒店预订管理系统源代码
- Microservice patterns
- 机会路由源代码+仿真工具(SCORP)
- 批量替换证件照片的底色(含源代码
- cocos2d-x飞机大战项目
- 分享一个远程控制软件源代码
- BLE-CC254x-1.3.2 蓝牙官方源代码
- 西班牙Telefonica电信公司采用Sun数据仓
- Microsoft Visio 2013 Professional 64位简体中
- Microsoft Project 2016
- 程序源代码行数统计工具
- flutter_gallery源代码
- 含Microsoft.Office.Interop.Owc11
- The Existence and Stability of Nontrivial St
- DS4000存储系统上Microsoft Exchange 2003的存
- 插件式GIS应用框架的设计与实现&mda
- x264源代码
- Microsoft Visual Studio 2017 Installer Project
- 通过 Microsoft Services for UNIX 将 UNIX 应用
- Microsoft Windows Services for UNIX 3.5 版中的
- Ross-Konno手术后左心室流出道梗阻
- 游戏物理引擎开发&源代码.zip
- Genome doubling and chromosome elimination wit
- Improvement of the coercivity and corrosion re
评论
共有 条评论