yukkysaito / godot_rviz2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

godot_rviz2 (ROS2 humble)

Environment

  • Ubuntu 22.04
  • GPU
  • Autoware (step1 in How to use)

How to use

  1. Autoware build following here.

  2. Build godot from source

    1. install pre-requirements following here by godot.

      sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm
    2. clone godot_rviz2

      git clone https://github.com/yukkysaito/godot_rviz2.git --recursive
    3. build godot with autoware and ros2 components.

      cd godot_rviz2/godot
      source <autoware_path>/install/setup.bash
      scons platform=linux -j8 custom_modules=../godot_rviz2
  3. Run Autoware and Godot

    1. Run Autoware

    2. Run Godot

      ./bin/godot.linuxbsd.editor.x86_64
    3. Import project and run.

      1. Import and select the project.godot file. imageimage

      2. Click run button. image

Key Config

key action
Space Show menu
Tab Switch view mode

How to customize

  1. Run Godot and import project from godot_rviz2/godot-project

    ./bin/godot.linuxbsd.editor.x86_64
  2. Edit on Godot GUI editor

  3. Click run button on top right on Godot GUI.

How to run from ROS2 launch

  1. Create godot_rviz2.py and modify path in cmd.
from launch_ros.actions import Node
 
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, ExecuteProcess
from launch.substitutions import LaunchConfiguration

def generate_launch_description():
    godot_rviz2 = ExecuteProcess(
        cmd=[[
            '~/workspace/godot_rviz2/godot/bin/godot.linuxbsd.editor.x86_64 --path ~/workspace/godot_rviz2/godot-project'
        ]],
        shell=True
    )
    return LaunchDescription([godot_rviz2])
  1. Run ros2 command.
ros2 launch <path>/godot_rviz2.py

How to Export Binary(WIP)

  1. Create template
scons platform=linux -j8 tools=no target=template_release custom_modules=../godot_rviz2
  1. Select godot.linuxbsd.template_release.x86_64 in Custom template
  2. Export

TODO

  • Refactor codes
  • Simplified description of ros dependencies on SCon build system
  • Visualize autoware_auto_mapping_msgs::msg::HADMapBin directly

Reference

About

License:Apache License 2.0


Languages

Language:C++ 77.9%Language:GDScript 21.5%Language:C 0.6%Language:Python 0.1%