【MR】C++ bullet客户端基于MR的动力学仿真

程序基于(A minimal example showing how to use PyBullet from C++ over shared memory.一个展示如何在共享内存上从c++使用PyBullet的最小示例。

https://github.com/erwincoumans/pybullet_cpp_sharedmemory_example

)实现与pybullet服务器通信交互。加上MR的算法库进行pybullet交互仿真。MR的参数放在json文件内,通过jsoncpp库实现参数解析。

------------------------------------------------------------------------------

本篇内容

Python打开bullet服务器GUI

仿真视频

首先终端打开pybullet服务器GUI(以便C++ bullet客户端连接):

运行C++ bullet客户端(主程序代码):

读取的MR参数文件--控制台输出:

注:遇到Json读取MR参数文件报错string too long。需要

indy7类实现了以下功能:

------------------------------------------------------------------------------

【MR】C++ bullet客户端基于MR的动力学仿真_第1张图片Python打开bullet服务器GUI

仿真视频

首先终端打开pybullet服务器GUI(以便C++ bullet客户端连接):

PS C:\Users\cxy> python -m pybullet_utils.runServer
pybullet build time: Dec  4 2022 15:08:03
starting thread 0
started testThreads thread 0 with threadHandle 00000000000002D8
argc=2
argv[0] = --unused
argv[1] = --start_demo_name=Physics Server
ExampleBrowserThreadFunc started
Version = 4.6.0 NVIDIA 512.52
Vendor = NVIDIA Corporation
Renderer = NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
b3Printf: Selected demo: Physics Server
starting thread 0
started MotionThreads thread 0 with threadHandle 0000000000000A04
MotionThreadFunc thread started
processing world
        merge base_link into world!
                relink shoulder_link from base_link to world!
        processing shoulder_link
                processing upper_arm_link
                        processing forearm_link
                                processing wrist_1_link
                                        processing wrist_2_link
                                                processing wrist_3_link
                                                        merge tcp into wrist_3_link!


world (mass=0.000000)


        shoulder_link (mass=11.803010) (joint joint0, joint type=URDFRevoluteJoint


                upper_arm_link (mass=7.992921) (joint joint1, joint type=URDFRevoluteJoint


                        forearm_link (mass=2.991341) (joint joint2, joint type=URDFRevoluteJoint


                                wrist_1_link (mass=2.123170) (joint joint3, joint type=URDFRevoluteJoint


                                        wrist_2_link (mass=2.288651) (joint joint4, joint type=URDFRevoluteJoint

运行C++ bullet客户端(主程序代码):

你可能感兴趣的:(mr,c++,开发语言)