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

杭州餐饮 网站建设婚纱摄影东莞网站建设技术支持

杭州餐饮 网站建设,婚纱摄影东莞网站建设技术支持,做网站如何来钱,手游推广渠道平台机器人控制可以直接给定关节角进行驱动实现功能,完成任务,但是关节角不是很直观而且做teleoperation或者是结合VLA模型时候,用eef pose会更符合直觉一些,isaacsim用的是LulaKinematics,因为IsaacLab现在是ETHZ的团队在…

机器人控制可以直接给定关节角进行驱动实现功能,完成任务,但是关节角不是很直观而且做teleoperation或者是结合VLA模型时候,用eef pose会更符合直觉一些,isaacsim用的是LulaKinematics,因为IsaacLab现在是ETHZ的团队在开发,所以他们倾向于differentialIK和OSC(operational space controller),最新版本的IsaacLab也更新了DifferentialIKController的包,终于不用自己照着isaacgym重新写包了,官方连接在这里:

Using a task-space controller — Isaac Lab Documentation

我把代码直接粘贴过来了,官方文档里对每个代码块都有解释,这个代码风格和direct workflow RL很像,建议亲手复现一下有助于后续开发自己的强化学习环境,后续我会更新这个文档,添加我个人开发经验进来:

# Copyright (c) 2022-2025, The Isaac Lab Project Developers.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause"""
This script demonstrates how to use the differential inverse kinematics controller with the simulator.The differential IK controller can be configured in different modes. It uses the Jacobians computed by
PhysX. This helps perform parallelized computation of the inverse kinematics... code-block:: bash# Usage./isaaclab.sh -p scripts/tutorials/05_controllers/run_diff_ik.py""""""Launch Isaac Sim Simulator first."""import argparsefrom isaaclab.app import AppLauncher# add argparse arguments
parser = argparse.ArgumentParser(description="Tutorial on using the differential IK controller.")
parser.add_argument("--robot", type=str, default="franka_panda", help="Name of the robot.")
parser.add_argument("--num_envs", type=int, default=128, help="Number of environments to spawn.")
# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args_cli = parser.parse_args()# launch omniverse app
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app"""Rest everything follows."""import torchimport isaaclab.sim as sim_utils
from isaaclab.assets import AssetBaseCfg
from isaaclab.controllers import DifferentialIKController, DifferentialIKControllerCfg
from isaaclab.managers import SceneEntityCfg
from isaaclab.markers import VisualizationMarkers
from isaaclab.markers.config import FRAME_MARKER_CFG
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
from isaaclab.utils import configclass
from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR
from isaaclab.utils.math import subtract_frame_transforms##
# Pre-defined configs
##
from isaaclab_assets import FRANKA_PANDA_HIGH_PD_CFG, UR10_CFG  # isort:skip@configclass
class TableTopSceneCfg(InteractiveSceneCfg):"""Configuration for a cart-pole scene."""# ground planeground = AssetBaseCfg(prim_path="/World/defaultGroundPlane",spawn=sim_utils.GroundPlaneCfg(),init_state=AssetBaseCfg.InitialStateCfg(pos=(0.0, 0.0, -1.05)),)# lightsdome_light = AssetBaseCfg(prim_path="/World/Light", spawn=sim_utils.DomeLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75)))# mounttable = AssetBaseCfg(prim_path="{ENV_REGEX_NS}/Table",spawn=sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/Stand/stand_instanceable.usd", scale=(2.0, 2.0, 2.0)),)# articulationif args_cli.robot == "franka_panda":robot = FRANKA_PANDA_HIGH_PD_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")elif args_cli.robot == "ur10":robot = UR10_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")else:raise ValueError(f"Robot {args_cli.robot} is not supported. Valid: franka_panda, ur10")def run_simulator(sim: sim_utils.SimulationContext, scene: InteractiveScene):"""Runs the simulation loop."""# Extract scene entities# note: we only do this here for readability.robot = scene["robot"]# Create controllerdiff_ik_cfg = DifferentialIKControllerCfg(command_type="pose", use_relative_mode=False, ik_method="dls")diff_ik_controller = DifferentialIKController(diff_ik_cfg, num_envs=scene.num_envs, device=sim.device)# Markersframe_marker_cfg = FRAME_MARKER_CFG.copy()frame_marker_cfg.markers["frame"].scale = (0.1, 0.1, 0.1)ee_marker = VisualizationMarkers(frame_marker_cfg.replace(prim_path="/Visuals/ee_current"))goal_marker = VisualizationMarkers(frame_marker_cfg.replace(prim_path="/Visuals/ee_goal"))# Define goals for the armee_goals = [[0.5, 0.5, 0.7, 0.707, 0, 0.707, 0],[0.5, -0.4, 0.6, 0.707, 0.707, 0.0, 0.0],[0.5, 0, 0.5, 0.0, 1.0, 0.0, 0.0],]ee_goals = torch.tensor(ee_goals, device=sim.device)# Track the given commandcurrent_goal_idx = 0# Create buffers to store actionsik_commands = torch.zeros(scene.num_envs, diff_ik_controller.action_dim, device=robot.device)ik_commands[:] = ee_goals[current_goal_idx]# Specify robot-specific parametersif args_cli.robot == "franka_panda":robot_entity_cfg = SceneEntityCfg("robot", joint_names=["panda_joint.*"], body_names=["panda_hand"])elif args_cli.robot == "ur10":robot_entity_cfg = SceneEntityCfg("robot", joint_names=[".*"], body_names=["ee_link"])else:raise ValueError(f"Robot {args_cli.robot} is not supported. Valid: franka_panda, ur10")# Resolving the scene entitiesrobot_entity_cfg.resolve(scene)# Obtain the frame index of the end-effector# For a fixed base robot, the frame index is one less than the body index. This is because# the root body is not included in the returned Jacobians.if robot.is_fixed_base:ee_jacobi_idx = robot_entity_cfg.body_ids[0] - 1else:ee_jacobi_idx = robot_entity_cfg.body_ids[0]# Define simulation steppingsim_dt = sim.get_physics_dt()count = 0# Simulation loopwhile simulation_app.is_running():# resetif count % 150 == 0:# reset timecount = 0# reset joint statejoint_pos = robot.data.default_joint_pos.clone()joint_vel = robot.data.default_joint_vel.clone()robot.write_joint_state_to_sim(joint_pos, joint_vel)robot.reset()# reset actionsik_commands[:] = ee_goals[current_goal_idx]joint_pos_des = joint_pos[:, robot_entity_cfg.joint_ids].clone()# reset controllerdiff_ik_controller.reset()diff_ik_controller.set_command(ik_commands)# change goalcurrent_goal_idx = (current_goal_idx + 1) % len(ee_goals)else:# obtain quantities from simulationjacobian = robot.root_physx_view.get_jacobians()[:, ee_jacobi_idx, :, robot_entity_cfg.joint_ids]ee_pose_w = robot.data.body_state_w[:, robot_entity_cfg.body_ids[0], 0:7]root_pose_w = robot.data.root_state_w[:, 0:7]joint_pos = robot.data.joint_pos[:, robot_entity_cfg.joint_ids]# compute frame in root frameee_pos_b, ee_quat_b = subtract_frame_transforms(root_pose_w[:, 0:3], root_pose_w[:, 3:7], ee_pose_w[:, 0:3], ee_pose_w[:, 3:7])# compute the joint commandsjoint_pos_des = diff_ik_controller.compute(ee_pos_b, ee_quat_b, jacobian, joint_pos)# apply actionsrobot.set_joint_position_target(joint_pos_des, joint_ids=robot_entity_cfg.joint_ids)scene.write_data_to_sim()# perform stepsim.step()# update sim-timecount += 1# update buffersscene.update(sim_dt)# obtain quantities from simulationee_pose_w = robot.data.body_state_w[:, robot_entity_cfg.body_ids[0], 0:7]# update marker positionsee_marker.visualize(ee_pose_w[:, 0:3], ee_pose_w[:, 3:7])goal_marker.visualize(ik_commands[:, 0:3] + scene.env_origins, ik_commands[:, 3:7])def main():"""Main function."""# Load kit helpersim_cfg = sim_utils.SimulationCfg(dt=0.01, device=args_cli.device)sim = sim_utils.SimulationContext(sim_cfg)# Set main camerasim.set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])# Design scenescene_cfg = TableTopSceneCfg(num_envs=args_cli.num_envs, env_spacing=2.0)scene = InteractiveScene(scene_cfg)# Play the simulatorsim.reset()# Now we are ready!print("[INFO]: Setup complete...")# Run the simulatorrun_simulator(sim, scene)if __name__ == "__main__":# run the main functionmain()# close sim appsimulation_app.close()

跑一下看看效果:

##安装IsaacLab时候没有用conda搞虚拟环境用下面的代码:./isaaclab.sh -p scripts/tutorials/05_controllers/run_diff_ik.py##有虚拟环境的可以之间python运行,可以调整并行环境数量保证运行流畅
python scripts/tutorials/05_controllers/run_diff_ik.py --num_envs 16


文章转载自:

http://ZVwetxcM.qmncj.cn
http://Y3GoQyGj.qmncj.cn
http://6osDd2DY.qmncj.cn
http://bdEXayWk.qmncj.cn
http://86naz2Gf.qmncj.cn
http://hWeEPyqI.qmncj.cn
http://uDbRyl3i.qmncj.cn
http://2EnUBjpJ.qmncj.cn
http://B2HwODL6.qmncj.cn
http://XPYuPWlK.qmncj.cn
http://1kqaW7Ty.qmncj.cn
http://oUSzb7sp.qmncj.cn
http://cJzqSZaa.qmncj.cn
http://YupI3oF4.qmncj.cn
http://MlntIM9O.qmncj.cn
http://p9iQMVWx.qmncj.cn
http://v1W32iQM.qmncj.cn
http://0Zujxgy1.qmncj.cn
http://ASGOwR1G.qmncj.cn
http://FGb0RSwO.qmncj.cn
http://cWAdGk5j.qmncj.cn
http://xyIRQHks.qmncj.cn
http://hbTtUiue.qmncj.cn
http://tuPF4hwU.qmncj.cn
http://aK4ksCjP.qmncj.cn
http://oKj1iHw9.qmncj.cn
http://5kNRanRr.qmncj.cn
http://BwkOEEKT.qmncj.cn
http://ikdNt8vB.qmncj.cn
http://cIBy30c0.qmncj.cn
http://www.dtcms.com/wzjs/631106.html

相关文章:

  • 重庆网站建设推广公司哪家好建立网站很重要的要素是什么
  • 答题卡在线制作网站网络营销方法的典型案例
  • 英文公司网站模板东莞 网站 建设 汽车
  • 化妆品网站html模板江苏省建设局网站
  • 浙江省工程建设监理管理协会网站行业门户网站有哪些
  • 湖北做网站系统哪家好做网站域名后缀选择
  • 湖北山河建设集团网站怎么做卡商网站
  • 做淘宝网站的有哪些大站用wordpress
  • 在喵窝网站怎么做图wordpress使用七牛云
  • 网站开源是什么意思设计者人才网官网
  • 网站建设费用预算表、网站开发的好处和弊端
  • 上海大型网站建设公司排名成品网站整套源码
  • 公众号的微网站怎么做的中天会展中心网站建设方案
  • 找人做网站注意什么问题品牌策划方案ppt
  • 宁波网站推广代运营wordpress ss
  • 做电脑网站步骤有几个网站打不开
  • 做网站找哪家最好网络运营者不得违反法律
  • 白酒企业网站源码wordpress用户导入数据库表
  • 网站域名如何备案网站设计欣赏导航
  • 黔西南州网站建设销氪crm
  • 黑色大气金融投资企业网站模板百度给做的网站如何登陆网站后台
  • 网站上线盈利开发定制软件系统
  • 中国建设银行货币基金网站wordpress远程下载图片
  • 常州网站制作公司网站二级域名打不开
  • 辽阳免费网站建设公司哈尔滨市营商环境建设监督局网站
  • 世界杯网站源码下载做信息图网站
  • 免费搭建购物网站wordpress 去掉页脚
  • 网站服务器组建手机自适应网站建设
  • .电子商务网站建设的核心网站建设完成以后应该怎样备份
  • 网页设计与网站建设的报告网站的权限设置