-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Home: Camera viewing and input streaming #128
Conversation
rcl_interfaces | ||
rclcpp | ||
rmw | ||
sensor_msgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those must be optional, so we need an option ENABLE_SMARTHOME
if(CMAKE_GENERATOR MATCHES Makefile) | ||
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/Uninstall.cmake) | ||
set_target_properties(uninstall PROPERTIES FOLDER "Build Utilities") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed?
@@ -332,7 +332,9 @@ macro(export_dep) | |||
set(SYSTEM_INCLUDES ${SYSTEM_INCLUDES} PARENT_SCOPE) | |||
set(DEPLIBS ${DEPLIBS} PARENT_SCOPE) | |||
set(DEP_DEFINES ${DEP_DEFINES} PARENT_SCOPE) | |||
set(${dep}_FOUND ${${dep}_FOUND} PARENT_SCOPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this? Please use ${depup} like all other depends
list(APPEND DEPLIBS ${${depup}_LIBRARIES}) | ||
list(APPEND DEP_DEFINES ${${dep}_DEFINITIONS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, all those shouldn't be needed
I'm very much building a stable system and then not touching it. Suggestions welcome but I don't currently have plans for this code. |
d90c088
to
4928dc1
Compare
Error was: CMake Error at CMakeLists.txt:479 (add_custom_target): add_custom_target cannot create target "uninstall" because another target with the same name already exists. The existing target is a custom target created in source directory. See documentation for policy CMP0002 for more details.
PR sent upstream, and it drops the some of the [temp] commits. |
Description
This PR introduces a new paradigm of Kodi usage: smart home interaction and control. Camera viewing and input streaming are provided as two initial use cases.
The approach I've taken with smart home is a bit unique: I built on ROS 2. While this introduces some heavy overhead, building on an industrial decentralized communication framework allows for scalability to virtually unlimited low power smart home devices. My smart home's computation graph is currently at 8 Linux nodes and 3 Arduino nodes and growing.
Alongside this PR is a repo devoted to my smart home OS: https://github.com/eigendude/OASIS.
OASIS provides a complete ROS 2 stack for computer vision, input streaming and general automation. It also provides a complete implementation of the Firmata protocol for communicating with Arduinos, with additional support for temperature and humidity sensors, I2C, servos, sonar, SPI, stepper motors, and 4-wire CPU fans.
Camera viewing
A new
cameraview
control is introduced. It takes a parameter, the ROS image topic to subscribe to. For testing, I created the followingSmartHome.xml
window:This window creates a 2x2 matrix. The top two cameraview controls are the direct output of two laptop cameras. The bottom two cameraview controls are the output of a rudimentary person detector using a background subtraction library applied to the camera feeds.
Screenshot of the above window (not bad for low light netbook cameras):
I forked the Kinect 2 driver and ported it to ROS 2. You can see depth registration working, but I'll probably do skeletal tracking on the 2D image via MediaPipe as a person detection solution.
Input streaming
The second use case is input streaming for smart home control. Kodi advertises two ROS topics:
/peripherals
- A list of attached input peripherals, which is all controllers plus the keyboard and mouse/input
- A topic that publishes the state of controllersKodi also provides a ROS service:
/capture_input
- Calling this service causes a peripheral's input to be captured and sent over theinput
topic.In my home, I'm using a PS controller to drive my childhood Lego train. The input is captured by Kodi running on my NAS with a Bluetooth dongle, and sent to a Raspberry Pi with an Ardiuno and a robotics motor controller that drives the train's 9V motors.
Motivation and context
Smart Home!!!!
How has this been tested?
I've been using Kodi as part of my smart home setup since May of 2021. ROS 2 is so robust that my system barely goes down.
What is the effect on users?
Related PRs
Depends on:
Types of change