Giter Club home page Giter Club logo

kaiaai / sample-apps Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 15.75 MB

Sample robot apps for Kaia.ai platform and Scout robot base

Home Page: https://kaia.ai

License: Apache License 2.0

HTML 46.71% JavaScript 53.29%
animation-library arduino-platform battery-level deep-learning face-detection gamepad image-classification image-recognition kaia-ai mobilenet robot robotics sensors speech-recognition telepresence tensorflow tensorflow-lite tensorflow-mobile usb-serial video-recording

sample-apps's Introduction

Kaia.ai Arduino/ROS2 home robots

Kaia.ai is a software platform for intelligent robots. Please read our blog for more.

Please sign up for a Kickstarter pre-launch invite here. We plan to launch on Kickstarter in 2nd half of 2024 via our Maker's Pet hardware partner's campaign.

Please visit the Support Forum!

Kaia.ai robotics software platform is actively evolving and currently consists of these parts:

  • Micro-ROS Arduino library for Kaia.ai-compatible robots repo
  • End-user and development ROS2 Docker images repo
  • Robot simulation ROS2 packages repo
  • Robot operation ROS2 packages repo, including SLAM mapping, navigation, etc.
  • WebRTC-based image/video/data streaming
    • Python-based image/audio sensing, processing (ML), decision making (ML/AI), robot face animation (TODO)
  • Cloud software infrastructure (TODO)
  • robot skills store (TODO)

Kaia.ai compatible robots

  • Maker's Pet Loki 200mm 3D-printable pet robot
  • Maker's Pet Fido 250mm 3D-printable pet robot
  • Maker's Pet Snoopy 300mm 3D-printable pet robot
  • Maker's Pet Mini 120mm
  • Add your own version to the list

Setup

  • View build, setup and bringup videos
    • This video is somewhat outdated; an up-to-date video will be published at a later time

Supported LiDAR/LDS sensors

  • YDLIDAR X4 (default), X2/X2L, X3, X3PRO
  • Neato XV11
  • Xiaomi Roborock 1st gen LDS02RR (~$16 off AliExpress including shipping)
  • SLAMTEC RPLIDAR A1
  • 3irobotix Delta-2A, Delta-2B, Delta-2G
  • LDROBOT LD14P
  • Camsense X1

The entire up-to-date list of supported LiDAR is here.

Command cheat sheets

Example: operate makerspet_loki robot using commands below. Operate Fido or Snoopy by replacing loki with fido or snoopy in commands below.

Launch Docker image to operate your robot

The Docker image contains ROS2 and micro-ROS pre-configured with additional Kaia.ai ROS2 packages.

Open a Windows command shell or Windows PowerShell window and type the command below. This should give you a bash prompt.

docker pull kaiaai/kaiaai:humble
docker run --name makerspet -it --rm -p 8888:8888/udp -p 4430:4430/tcp -e DISPLAY=host.docker.internal:0.0 -e LIBGL_ALWAYS_INDIRECT=0 kaiaai/kaiaai:humble

Get an aditional bash prompt by opening another Windows command shell or Windows PowerShell window and typing:

docker exec -it makerspet bash

Operate a physical robot

# Launch the physical robot
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki

# Drive robot manually
ros2 run kaiaai_teleop teleop_keyboard robot_model:=makerspet_loki

# Monitor robot sensors
ros2 launch kaiaai_bringup monitor_robot.launch.py robot_model:=makerspet_loki

# Create a map while driving manually
ros2 launch kaiaai_bringup cartographer.launch.py robot_model:=makerspet_loki

# Save the newly-created map
ros2 run nav2_map_server map_saver_cli -f ~/map --ros-args -p save_map_timeout:=60.0

# Robot self-drives using an existing map
ros2 launch kaiaai_bringup navigation.launch.py robot_model:=makerspet_loki map:=$HOME/map

Create a map automatically - no manual driving

# Launch the physical robot
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki

# Launch SLAM (simultaneous localization and mapping) - navigate and map simultaneously
ros2 launch kaiaai_bringup navigation.launch.py robot_model:=makerspet_loki slam:=True

# Robot automatically seeks out, self-drives to unknown locations
ros2 launch explore_lite explore.launch.py

# Save the newly-created map
ros2 run nav2_map_server map_saver_cli -f ~/map --ros-args -p save_map_timeout:=60.0

Specify LDS/LiDAR model to use

ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=XIAOMI-LDS02RR
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X4
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X3
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X3-PRO
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X2-X2L
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=NEATO-XV11
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=DELTA-2A
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=DELTA-2B
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=DELTA-2G
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=LDROBOT-LD14P
ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=CAMSENSE-X1

View, set physical robot's parameters

# View parameters
ros2 node list
ros2 node info /MAKERSPET_LOKI
ros2 param list /MAKERSPET_LOKI
ros2 param dump /MAKERSPET_LOKI

# Set the desired laser scan frequency to 7 Hz
ros2 param set /MAKERSPET_LOKI lds.scan_freq 7.0

# Get the current desired laser scan frequency
ros2 param get /MAKERSPET_LOKI lds.scan_freq

# Reset the desired laser scan frequency to default
ros2 param set /MAKERSPET_LOKI lds.scan_freq 0.0

Operate a simulated robot

# Launch the robot in a simulation - drive manually
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 run kaiaai_teleop teleop_keyboard robot_model:=makerspet_loki
ros2 launch kaiaai_gazebo self_drive_gazebo.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup monitor_robot.launch.py robot_model:=makerspet_loki

# Launch the robot in a simulation - robot self-drives around
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_gazebo self_drive_gazebo.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup monitor_robot.launch.py robot_model:=makerspet_loki

# Launch the robot in a simulation - create, save a map; robot self-drives around
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup cartographer.launch.py use_sim_time:=true robot_model:=makerspet_loki
ros2 launch kaiaai_gazebo self_drive_gazebo.launch.py robot_model:=makerspet_loki
ros2 run nav2_map_server map_saver_cli -f ~/living_room_map --ros-args -p save_map_timeout:=60.0

# Launch the robot in a simulation - let it navigate automatically using an existing map
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup navigation.launch.py use_sim_time:=true robot_model:=makerspet_loki \
  map:=/ros_ws/src/kaiaai_simulations/kaiaai_gazebo/map/living_room.yaml

# Launch the robot in a simulation - navigate and create a map simultaneously; save the map
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup navigation.launch.py use_sim_time:=true robot_model:=makerspet_loki slam:=True
ros2 run nav2_map_server map_saver_cli -f ~/map --ros-args -p save_map_timeout:=60.0

# Launch the robot in a simulation - navigate and create a map simultaneously
# Robot seeks out, self-drives to unknown locations to complete the mapping
ros2 launch kaiaai_gazebo world.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup navigation.launch.py use_sim_time:=true robot_model:=makerspet_loki slam:=True
ros2 launch explore_lite explore.launch.py
ros2 run nav2_map_server map_saver_cli -f ~/map --ros-args -p save_map_timeout:=60.0

Add your own modifications to an existing robot

# Inspect, edit robot's URDF model
ros2 launch kaiaai_bringup inspect_urdf.launch.py robot_model:=makerspet_loki
ros2 launch kaiaai_bringup edit_urdf.launch.py robot_model:=makerspet_loki

# Convert URDF robot model file into SDF Gazebo simulation model file
ros2 run kaiaai_gazebo urdf2sdf.sh /ros_ws/src/makerspet_loki
cd /ros_ws && colcon build --symlink-install --packages-select makerspet_loki

Acknowledgements

Initial versions of packages in this repo are based on ROBOTIS Turtlebot3 code

Release notes

v0.10.0 in debug

  • TODO

v0.9.0

  • added WebRTC, web server, OpenCV launch
  • added Camsense X1 LiDAR

v0.8.0

  • added kaiaai_python ROS2 package
  • added 3irobotix Delta-2A 230400 baud (vs 115200)
  • added 3irobotix Delta-2B
  • bugfix missing first scan point

v0.7.0

  • kaiaai_telemetry
    • switched to KaiaTelemetry2 message
    • publish /battery_state
    • publish /wifi_state RSSI
    • discard_broken_scans, needs more debug
  • added LDROBOT LD14P

v0.6.0 2/11/2024

  • added 3irobotix Delta-2A, Delta-2G
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=DELTA-2A
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=DELTA-2G

2/5/2024

  • added LiDAR/LDS laser distance scan sensors support
    • YDLIDAR X3, X3-PRO
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X3
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X3-PRO
    • Neato XV11 ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=NEATO-XV11
    • RPLIDAR A1 ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=RPLIDAR-A1
  • split kaiaai_telemetry config into default and custom
    • kaiaai/kaiaai_telemetry/config/telem.yaml is the default config
    • makerspet_loki/config/telem.yaml is the custom config for the Loki robot model
    • makerspet_fido/config/telem.yaml is the custom config for the Fido robot model
    • makerspet_snoopy/config/telem.yaml is the custom config for the Snoopy robot model

1/28/2024

  • added YDLIDAR X2 support to kaiaai_telemetry
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X2

1/21/2024

  • kaiaai_telemetry now supports multiple LiDAR/LDS laser distance scan sensors
    • added Xiaomi Mi LDS02RR; default is YDLIDAR X4
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=XIAOMI-LDS02RR
    • ros2 launch kaiaai_bringup physical.launch.py robot_model:=makerspet_loki lds_model:=YDLIDAR-X4

12/11/2024

  • added fully automatic self-driving to map exploration (frontier exploration m-explore)
    • ros2 launch explore_lite explore.launch.py
    • I think this code needs debug

12/7/2024

  • added Nav2 SLAM (as an alternative to Google Cartographer)
    • Nav2 SLAM enables driving autonomously to a set goal while mapping (and while the map is still incomplete)
  • increase the map saver default timeout
    • fixed the map saving command timing out on my "slow" laptop

sample-apps's People

Contributors

kaiaai avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.