<commit_before>#pragma once

#include <ros/ros.h>
#include <sensor_msgs/Range.h>
#include <std_msgs/Char.h>
#include <string>

#include <dynamic_reconfigure/server.h>
#include <teraranger_array/TerarangerHubEvoConfig.h>
#include <teraranger_array/RangeArray.h>
#include <wjwwood_serial/serial.h>

#define BUFFER_SIZE 31
#define RANGES_FRAME_LENGTH 20
#define RANGE_CRC_POS 19
#define IMU_QUAT_FRAME_LENGHT 12
#define IMU_EULER_FRAME_LENGHT 10
#define IMU_QUATLIN_FRAME_LENGHT 18

namespace teraranger_array
{
// Protocol commands
static const char ENABLE_CMD[5] = {(char)0x00, (char)0x52, (char)0x02, (char)0x01, (char)0xDF};
static const char DISABLE_CMD[5] = {(char)0x00, (char)0x52, (char)0x02, (char)0x00, (char)0xD8};

static const char TEXT_MODE[4] = {(char)0x00, (char)0x11, (char)0x01, (char)0x45};
static const char BINARY_MODE[4] = {(char)0x00, (char)0x11, (char)0x02, (char)0x4C};

static const char LONG_RANGE[4] = {(char)0x00, (char)0x21, (char)0x04, (char)0xA7}; // for long range evo
static const char SHORT_RANGE[4] = {(char)0x00, (char)0x21, (char)0x02, (char)0xB5}; // for short range evo

static const char CROSSTALK_MODE[4] = {(char)0x00, (char)0x31,(char)0x01,(char)0xB5}; // All sensors in parallel
static const char NONCROSSTALK_MODE[4] = {(char)0x00, (char)0x31, (char)0x02, (char)0xE5}; // All sensors sequentially<commit_msg>Add imu message header<commit_after>#pragma once

#include <ros/ros.h>
#include <sensor_msgs/Range.h>
#include <std_msgs/Char.h>
#include <sensor_msgs/Imu.h>
#include <string>

#include <dynamic_reconfigure/server.h>
#include <teraranger_array/TerarangerHubEvoConfig.h>
#include <teraranger_array/RangeArray.h>
#include <wjwwood_serial/serial.h>

#define BUFFER_SIZE 31
#define RANGES_FRAME_LENGTH 20
#define RANGE_CRC_POS 19
#define IMU_QUAT_FRAME_LENGHT 12
#define IMU_EULER_FRAME_LENGHT 10
#define IMU_QUATLIN_FRAME_LENGHT 18

namespace teraranger_array
{
// Protocol commands
static const char ENABLE_CMD[5] = {(char)0x00, (char)0x52, (char)0x02, (char)0x01, (char)0xDF};
static const char DISABLE_CMD[5] = {(char)0x00, (char)0x52, (char)0x02, (char)0x00, (char)0xD8};

static const char TEXT_MODE[4] = {(char)0x00, (char)0x11, (char)0x01, (char)0x45};
static const char BINARY_MODE[4] = {(char)0x00, (char)0x11, (char)0x02, (char)0x4C};

static const char LONG_RANGE[4] = {(char)0x00, (char)0x21, (char)0x04, (char)0xA7}; // for long range evo
static const char SHORT_RANGE[4] = {(char)0x00, (char)0x21, (char)0x02, (char)0xB5}; // for short range evo

static const char CROSSTALK_MODE[4] = {(char)0x00, (char)0x31,(char)0x01,(char)0xB5}; // All sensors in parallel
static const char NONCROSSTALK_MODE[4] = {(char)0x00, (char)0x31, (char)0x02, (char)0xE5}; // All sensors sequentially
{'fraction_non_alphanumeric': 0.14854014598540147, 'fraction_numerical': 0.08321167883211679, 'mean_word_length': 7.206586826347305, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2222078', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1164, 'n_words': 242}