Skip to content

Commit 09d906d

Browse files
authored
Merge pull request #372 from jhwangbo/master
V1.1.5 RaisimUnreal interaction methods added
2 parents 8d9a1fc + 8d2590d commit 09d906d

File tree

199 files changed

+2852
-1202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+2852
-1202
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
set(RAISIM_VERSION 1.1.4)
2+
set(RAISIM_VERSION 1.1.5)
33
project(raisim VERSION ${RAISIM_VERSION} LANGUAGES CXX)
44
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
55

DEVELOPERS_ONLY/windowsInstall.ps1

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,31 @@ cmake -G"Visual Studio 16 2019" -A x64 .. -DRAISIM_TEST=OFF -DCMAKE_INSTALL_PREF
88
cmake --build . --config Debug
99
cmake --build . --target install --config Debug
1010

11+
conda activate python35
1112
Set-Location C:\Users\jemin\source\repos\raisimLib\build
12-
cmake .. -DRAISIM_EXAMPLE=ON -DRAISIM_PY=ON -DRAISIM_MATLAB=ON -DPYTHON_EXECUTABLE=C:\Users\jemin\anaconda3\envs\python35\python
13+
cmake .. -DRAISIM_EXAMPLE=ON -DRAISIM_PY=ON -DRAISIM_MATLAB=ON -DPYTHON_EXECUTABLE:FILEPATH=C:\Users\jemin\anaconda3\envs\python35\python
1314
cmake --build . --config Release
1415

16+
conda activate python36
17+
Set-Location C:\Users\jemin\source\repos\raisimLib\build
18+
cmake .. -DRAISIM_EXAMPLE=OFF -DRAISIM_PY=ON -DRAISIM_MATLAB=OFF -DPYTHON_EXECUTABLE:FILEPATH=C:\Users\jemin\anaconda3\envs\python36\python
19+
cmake --build . --config Release
20+
21+
conda activate python37
22+
Set-Location C:\Users\jemin\source\repos\raisimLib\build
23+
cmake .. -DRAISIM_EXAMPLE=OFF -DRAISIM_PY=ON -DRAISIM_MATLAB=OFF -DPYTHON_EXECUTABLE:FILEPATH=C:\Users\jemin\anaconda3\envs\python37\python
24+
cmake --build . --config Release
25+
26+
conda activate python38
27+
Set-Location C:\Users\jemin\source\repos\raisimLib\build
28+
cmake .. -DRAISIM_EXAMPLE=OFF -DRAISIM_PY=ON -DRAISIM_MATLAB=OFF -DPYTHON_EXECUTABLE:FILEPATH=C:\Users\jemin\anaconda3\envs\python38\python
29+
cmake --build . --config Release
30+
31+
conda activate python39
32+
Set-Location C:\Users\jemin\source\repos\raisimLib\build
33+
cmake .. -DRAISIM_EXAMPLE=OFF -DRAISIM_PY=ON -DRAISIM_MATLAB=OFF -DPYTHON_EXECUTABLE:FILEPATH=C:\Users\jemin\anaconda3\envs\python39\python
34+
cmake --build . --config Release
35+
36+
37+
1538
cd C:\Users\jemin

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH (v1.14)
1+
# RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH (v1.1.5)
22

33
Click to watch the video
44

examples/src/maps/anymals.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
int main(int argc, char* argv[]) {
1010
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1111
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
12-
#if WIN32
13-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
14-
#endif
1512

1613
/// create raisim world
1714
raisim::World world;
@@ -56,7 +53,7 @@ int main(int argc, char* argv[]) {
5653
server.focusOn(anymalC);
5754

5855
for (int i=0; i<200000000; i++) {
59-
std::this_thread::sleep_for(std::chrono::microseconds(1000));
56+
raisim::MSLEEP(1);
6057
server.integrateWorldThreadSafe();
6158
}
6259

examples/src/maps/atlas.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613

1714
/// create raisim world
1815
raisim::World world;
@@ -53,7 +50,7 @@ int main(int argc, char* argv[]) {
5350
server.launchServer();
5451

5552
while (1) {
56-
std::this_thread::sleep_for(std::chrono::microseconds(500));
53+
raisim::USLEEP(1000);
5754
atlas[0]->setExternalForce(0, {300,-300,30});
5855
atlas[0]->setExternalTorque(0, {0,40,0});
5956
raisim::VecDyn vec(7);

examples/src/maps/hill1.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613

1714
/// create raisim world
1815
raisim::World world;
@@ -46,7 +43,7 @@ int main(int argc, char* argv[]) {
4643
server.launchServer();
4744

4845
for (int i=0; i<2000000; i++) {
49-
std::this_thread::sleep_for(std::chrono::microseconds(1000));
46+
raisim::MSLEEP(1);
5047
server.integrateWorldThreadSafe();
5148
}
5249

examples/src/maps/lake1.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613

1714
/// create raisim world
1815
raisim::World world;
@@ -46,7 +43,7 @@ int main(int argc, char* argv[]) {
4643
server.launchServer();
4744

4845
for (int i=0; i<2000000; i++) {
49-
std::this_thread::sleep_for(std::chrono::microseconds(1000));
46+
raisim::MSLEEP(1);
5047
server.integrateWorldThreadSafe();
5148
}
5249

examples/src/maps/mountain1.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613

1714
/// create raisim world
1815
raisim::World world;
@@ -46,11 +43,9 @@ int main(int argc, char* argv[]) {
4643
server.launchServer();
4744

4845
for (int i=0; i<2000000; i++) {
49-
std::this_thread::sleep_for(std::chrono::microseconds(1000));
46+
raisim::MSLEEP(1);
5047
server.integrateWorldThreadSafe();
5148
}
5249

53-
std::cout<<"mass "<<aliengo->getMassMatrix()[0]<<std::endl;
54-
5550
server.killServer();
5651
}

examples/src/maps/office1.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613

1714
/// create raisim world
1815
raisim::World world(binaryPath.getDirectory() + "\\rsc\\raisimUnrealMaps\\office1.xml");
@@ -50,7 +47,7 @@ int main(int argc, char* argv[]) {
5047
server.launchServer();
5148

5249
for (int i=0; i<2000000; i++) {
53-
std::this_thread::sleep_for(std::chrono::microseconds(20));
50+
raisim::MSLEEP(1);
5451
server.integrateWorldThreadSafe();
5552
}
5653

examples/src/mjcf/ant.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
int main(int argc, char* argv[]) {
1111
auto binaryPath = raisim::Path::setFromArgv(argv[0]);
1212
raisim::World::setActivationKey(binaryPath.getDirectory() + "\\rsc\\activation.raisim");
13-
#if WIN32
14-
timeBeginPeriod(1); // for sleep_for function. windows default clock speed is 1/64 second. This sets it to 1ms.
15-
#endif
1613
RSWARN("Please copy-paste files in \"https://github.com/openai/gym/tree/master/gym/envs/mujoco/assets\" to the resource directory and run cmake again (which will copy the asset folder to the build folder)")
1714
raisim::World world(binaryPath.getDirectory()+"\\rsc\\mjcf\\ant.xml");
1815
raisim::RaisimServer server(&world);
@@ -22,7 +19,7 @@ int main(int argc, char* argv[]) {
2219
server.launchServer();
2320
for (int i=0; i<10000000; i++) {
2421
world.integrate();
25-
std::this_thread::sleep_for(std::chrono::milliseconds(size_t(1000 * world.getTimeStep())));
22+
raisim::MSLEEP(1);
2623
}
2724

2825
server.stopRecordingVideo();

0 commit comments

Comments
 (0)