ros2web_app
is a web application framework that enables the development
of web applications through YAML configuration and the creation of ROS2 packages.
First install the ros2web
.
python3 -m pip install -r requirements.txt
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/ros2web/ros2web_app.git
cd ~/ros2_ws
colcon build
. ./install/local_setup.bash
If you get the following error with the colcon build, please update numpy.
TypeError: 'numpy._DTypeMeta' object is not subscriptable
pip install numpy --upgrade
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
# Create package
# ros2 web create <Package Name>
ros2 web create hello
cd ~/ros2_ws
colcon build --symlink-install
. ./install/local_setup.bash
ros2 run hello hello
# Star ros2web (another terminal)
ros2 web server --no-auth
Access the following URL.