mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 22:20:12 +00:00
0efc67841d
add grpcPlugin, it can work in GUI, SHARED_MEMORY_SERVER, DIRECT and other modes. example script to start server from pybullet: import pybullet as p p.connect(p.GUI) #if statically linked plugin id = p.loadPlugin("grpcPlugin") #dynamics loading the plugin #id = p.loadPlugin("E:/develop/bullet3/bin/pybullet_grpcPlugin_vs2010_x64_debug.dll", postFix="_grpcPlugin") #start the GRPC server at hostname, port if (id>=0): p.executePluginCommand(id, "localhost:1234") Only in DIRECT mode, since there is no 'ping' you need to call to handle RCPs: numRPC = 10 while (1): p.executePluginCommand(id, intArgs=[numRPC])
44 lines
995 B
Lua
44 lines
995 B
Lua
|
|
|
|
project ("pybullet_grpcPlugin")
|
|
language "C++"
|
|
kind "SharedLib"
|
|
|
|
includedirs {".","../../../../src", "../../../../examples",
|
|
"../../../ThirdPartyLibs"}
|
|
defines {"PHYSICS_IN_PROCESS_EXAMPLE_BROWSER"}
|
|
|
|
initGRPC()
|
|
|
|
links{"BulletFileLoader", "Bullet3Common", "LinearMath"}
|
|
|
|
|
|
if os.is("MacOSX") then
|
|
-- targetextension {"so"}
|
|
links{"Cocoa.framework"}
|
|
end
|
|
|
|
|
|
files {
|
|
"grpcPlugin.cpp",
|
|
"../../PhysicsClient.cpp",
|
|
"../../PhysicsClient.h",
|
|
"../../PhysicsClientSharedMemory.cpp",
|
|
"../../PhysicsClientSharedMemory.h",
|
|
"../../PhysicsClientSharedMemory_C_API.cpp",
|
|
"../../PhysicsClientSharedMemory_C_API.h",
|
|
"../../PhysicsClientC_API.cpp",
|
|
"../../PhysicsClientC_API.h",
|
|
"../../Win32SharedMemory.cpp",
|
|
"../../Win32SharedMemory.h",
|
|
"../../PosixSharedMemory.cpp",
|
|
"../../PosixSharedMemory.h",
|
|
"../../../Utils/b3Clock.cpp",
|
|
"../../../Utils/b3Clock.h",
|
|
"../../../Utils/b3ResourcePath.cpp",
|
|
"../../../Utils/b3ResourcePath.h",
|
|
}
|
|
|
|
|
|
|