Skip to content

sarthou/HelloWorlds

Repository files navigation

HelloWorlds

HelloWorlds is a simple PhysX-based 3D world engine with visualization specialized for robotic applications.

Its main features include:

  • Creation of multiple independent worlds in parallel
  • Abstraction of PhysX complexity
  • Image rendering (and thus camera emulation)

The engine comes with mesh loaders (OBJ, STL, and Collada) and a URDF loader for out-of-the-box use.

Regarding 3D visualization, a dedicated OpenGL-based solution has been implemented. It supports ambient, specular, and normal textures, manages sunlight and point lights, provides skybox functionality, and allows for debug elements (lines and user-oriented text).

In sum: If you like PyBullet, you will prefer HelloWorlds.

Build PhysX

HelloWorlds uses PhysX. Here bellow we explain how to build it.

Once you have cloned HelloWorlds, go into the External folder and clone PhysX.

cd hello_worlds/External
git clone --depth 1 --branch 106.5-physx-5.5.1 https://github.com/NVIDIA-Omniverse/PhysX.git
hello_worlds/
├── CMakeLists.txt
├── src/
└── External/
    └── PhysX/
        ├── physx/
        │   ├── generate_projects.sh
        │   ├── compiler/
        │   └── include/
        ├── blast/
        └── flow/

We then have to generate the projects depending on your platform. Here bellow you assume a GCC use but you can freely use Clang.

cd PhysX/physx
./generate_projects.sh
hello_worlds/
├── CMakeLists.txt
├── src/
└── External/
    └── PhysX/
        ├── physx/
        │   ├── generate_projects.sh
        │   ├── compiler/
        │   │   ├── linux-gcc-debug
        │   │   └── linux-gcc-release
        │   └── include/
        ├── blast/
        └── flow/

Once the project generated, we can compile it.

cd compiler/linux-gcc-release
make
make install
HelloWorlds/
├── CMakeLists.txt
├── src/
└── External/
    └── PhysX/
        ├── physx/
        │   ├── install
        │   │   └── linux
        │   │       └── PhysX
        │   │           ├── bin
        │   │           └── include
        │   ├── generate_projects.sh
        │   ├── compiler/
        │   │   ├── linux-gcc-debug
        │   │   └── linux-gcc-release
        │   └── include/
        ├── blast/
        └── flow/

Build HelloWorlds

HelloWorlds is ROS independent but supports to be a ROS package. In such a way it can be built in different way depending on you usage.

sudo apt install -y libglm-dev libglfw3-dev libfreetype-dev

1. Standalone Build (No ROS)

To build and install the library without ROS, use standard CMake commands:

mkdir build && cd build
cmake ..
make -j
sudo make install # Installs to system directories (e.g., /usr/local/lib, /usr/local/include)
                  # -DCMAKE_INSTALL_PREFIX can also be used

2. ROS 1 Build

Use a catkin workspace:

cd ~/catkin_ws/
source /opt/ros/noetic/setup.bash # Example for Noetic
catkin build hello_worlds

3. ROS 2 Build

Use an ament workspace:

cd ~/ros2_ws/
source /opt/ros/humble/setup.bash # Example for Humble
colcon build --packages-select hello_worlds

Test HelloWorlds

1. Standalone Test (No ROS)

In standalone mode, we use ctest to manage and run the GoogleTest suite.

# Run all tests
ctest --output-on-failure

# Run a specific test (e.g., ModelManager)
./tests/ModelManagerTests

2. ROS 1 Test

In a ROS 1 workspace, tests are handled via the run_tests target provided by Catkin.

# Run the tests for this specific package
catkin_make run_tests_hello_worlds

# Alternatively, using catkin_tools:
catkin run_tests hello_worlds --no-deps

3. ROS 2 Test

For ROS 2, we use colcon to build the package and colcon test to execute the integrated ament tests..

# Run the tests
colcon test --packages-select hello_worlds --event-handlers console_direct+

# View detailed results
colcon test-result --all --verbose

About

HelloWorlds is a simple PhysX-based 3D world engine with visualization specialized for robotic applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors