Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Vector 4 -> Vector31.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
inusha47 committed Jan 27, 2024
1 parent d986121 commit ffd8d39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/viper/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Node : public rclcpp::Node
/************** code************/

static uint16_t constexpr setpoint_velocity_ID = 113;
cyphal::Publisher<zubax::primitive::real16::Vector4> setpoint_velocity_ID;
cyphal::Publisher<zubax::primitive::real16::Vector31.1.0> setpoint_velocity_ID;

static std::chrono::milliseconds constexpr CTRL_LOOP_RATE{10};
rclcpp::TimerBase::SharedPtr _ctrl_loop_timer;
Expand Down
6 changes: 3 additions & 3 deletions src/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Node::Node()

_cyphal_demo_pub = _node_hdl.create_publisher<uavcan::primitive::real16::Integer8_1_0>(CYPHAL_DEMO_PORT_ID, 1*1000*1000UL);

setpoint_velocity_ID= _node_hdl.create_subscription<zubax::primitive::real16::Vector4>(setpoint_velocity_ID,1*1000*1000UL)
setpoint_velocity_ID= _node_hdl.create_subscription<zubax::primitive::real16::Vector31.1.0>(setpoint_velocity_ID,1*1000*1000UL)


RCLCPP_INFO(get_logger(), "%s init complete.", get_name());
Expand Down Expand Up @@ -225,9 +225,9 @@ void Node::ctrl_loop()
_cyphal_demo_pub->publish(demo_msg);
demo_cnt++;

setpoint_velocity_ID = _node_hdl.create_publisher<zubax::primitive::real16::Vector4>(setpoint_velocity_ID, 1*1000*1000UL)
setpoint_velocity_ID = _node_hdl.create_publisher<zubax::primitive::real16::Vector31.1.0>(setpoint_velocity_ID, 1*1000*1000UL)
float motor_values[4] = {100.0, 100.0, 100.0, 100.0};
zubax::primitive::real16::Vector4 const motor_msg{motor_values};
zubax::primitive::real16::Vector31.1.0 const motor_msg{motor_values};
setpoint_velocity_ID->publish(motor_msg);


Expand Down

0 comments on commit ffd8d39

Please sign in to comment.