First flake environment

This commit is contained in:
2025-11-06 15:59:22 +01:00
parent 8648a96bce
commit d8b55f08de
33 changed files with 371 additions and 26 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.24)
project(mg_bt)
set(CMAKE_CXX_STANDARD 17)

View File

@ -1,6 +1,5 @@
#include "rclcpp/rclcpp.hpp"
#include "mg_msgs/srv/i2c.hpp"
extern "C" {
#include <fcntl.h>
@ -8,6 +7,7 @@ extern "C" {
#include <sys/ioctl.h>
#include <i2c/smbus.h>
}
class MgI2c : public rclcpp::Node {
using I2cSrv = mg_msgs::srv::I2c;

19
mg_bt/package.nix Normal file
View File

@ -0,0 +1,19 @@
# Automatically generated by: ros2nix --distro jazzy
{ lib, buildRosPackage, ament-cmake, ament-lint-auto, ament-lint-common, behaviortree-cpp, behaviortree-ros2, btcpp-ros2-interfaces, i2c-tools, mg-msgs, rclcpp }:
buildRosPackage rec {
pname = "ros-jazzy-mg-bt";
version = "0.0.0";
src = ./.;
buildType = "ament_cmake";
buildInputs = [ ament-cmake ];
checkInputs = [ ament-lint-auto ament-lint-common ];
propagatedBuildInputs = [ behaviortree-cpp behaviortree-ros2 btcpp-ros2-interfaces i2c-tools mg-msgs rclcpp ];
nativeBuildInputs = [ ament-cmake ];
meta = {
description = "Behavior for MagRob";
license = with lib.licenses; [ asl20 ];
};
}