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

IsaacLab笔记(1)利用standalone python创建场景

        IsaacSim主要有三种工作流:GUI界面,Extension以及standalone方式,对于python编程,一般使用Extension以及standalone,Extension一般依托交互界面,standalone模式直接调用IsaacSim的Core API,不依赖界面交互,更加适合平时的大规模仿真任务。

下面采用standalone的方式进行简单的场景设置


from isaacsim import SimulationApp
simulation_app = SimulationApp({"headless": False})import omni.usd
from pxr import UsdLux, Sdf, Gffrom isaacsim.core.api import World
from isaacsim.core.api.objects import DynamicCuboid
import numpy as npworld = World(stage_units_in_meters=1.0)
world.scene.add_default_ground_plane()# stage = omni.usd.get_context().get_stage()
# sun_light = UsdLux.DistantLight.Define(stage, Sdf.Path("/World/SunLight"))
# sun_light.CreateIntensityAttr(500.0) 
# sun_light.CreateColorAttr(Gf.Vec3f(1.0, 1.0, 0.95))  fancy_cube = world.scene.add(DynamicCuboid(prim_path="/World/random_cube",name="fancy_cube",position=np.array([0, 0, 2.000]),scale=np.array([0.5015, 0.505, 0.5015]),size=1.0,color=np.array([0, 0, 1.0]),)
)for i in range(2000):position, orientation = fancy_cube.get_world_pose()linear_velocity = fancy_cube.get_linear_velocity()print("Cube position is : " + str(position))print("Cube's orientation is : " + str(orientation))print("Cube's linear velocity is : " + str(linear_velocity))# we have control over stepping physics and rendering in this workflow# things run in syncworld.step(render=True)  # execute one physics step and one rendering step
world.reset()
simulation_app.close()

该代码通过DynamicCuboid类添加一个动态立方体,并仿真获取其位姿,速度信息。

运行一下指令,切换成你自己创建的代码路径

./python.sh /home/sun/isaac-sim/standalone_examples/api/isaacsim.aa.pick_cube/enviroment.py

点击运行会发现蓝色方块掉落,终端输出信息

http://www.dtcms.com/a/619364.html

相关文章:

  • 中国建设银行上海分行信息网站如何制作网址
  • 构建AI智能体:九十六、基于YOLO的智能生活助手:食材识别、植物健康与宠物行为分析
  • 企业网站蓝色模板下载官方网站建设计划书
  • 网站建设与运营财务报表网页制作工具
  • 高端酒店网站模板免费下载品牌英语
  • 南昌网站优化北京电力交易中心领导班子
  • 本地主机做网站服务器软件系统开发与设计
  • pycharm设置
  • 做平面vi网站如何百度注册公司官网
  • 网站首页404茂名网站优化
  • 从Win回顾微软平台的各种技术
  • 抗EOS设计详解及实际"栗子"
  • 许昌网站建设汉狮怎么样中国万网张向东
  • 做网站设计用什么软件最好网站建设连接数据库
  • 线代强化NO8|向量|运算|线性相关|内积正交|施密特正交化|线性表示的判定证明
  • 组合优化与递归搜索:24点求解的表达式树构建与算法完备性
  • 江苏建设厅官方网站正规的网站制作电话
  • C#21、什么是扩展方法
  • ps模板网站苏州城乡建设局的网站首页
  • idc 公司网站模板网站开发报价单模板
  • 大模型-vllm如何部署新模型-2
  • 我编辑好了一个urdf文件,但是我怕有什么错误,有什么可以用于调试或者发现urdf文件错误的命令行工具吗
  • 外贸公司网站有哪些西安市建设工程信息网平台
  • 中英文网站切换建设银行扬中网站
  • Java Faker库详解
  • 用七牛做网站定制化网站开发的好处
  • 荆门做网站北京网站备案注销中心
  • 著名建站公司哈尔滨市工程建设招投标网
  • 第三方软件验收测试报告有哪些测试内容?多少钱才算合适?
  • 松江品划网站建设推广宿州建设银行网站