Skip to content

Commit

Permalink
MujocoImage -> ObkImage
Browse files Browse the repository at this point in the history
  • Loading branch information
alberthli committed Jul 20, 2024
1 parent 8f02aa0 commit 54e02ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions obelisk/cpp/obelisk_cpp/include/obelisk_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "obelisk_estimator_msgs/msg/estimated_state.hpp"

#include "obelisk_sensor_msgs/msg/joint_encoders.hpp"
#include "obelisk_sensor_msgs/msg/mujoco_image.hpp"
#include "obelisk_sensor_msgs/msg/obk_image.hpp"
#include "obelisk_sensor_msgs/msg/true_sim_state.hpp"

#include "obelisk_std_msgs/msg/float_multi_array.hpp"
Expand Down Expand Up @@ -128,14 +128,14 @@ namespace obelisk {
using ObeliskMsgs =
std::tuple<obelisk_control_msgs::msg::PositionSetpoint, obelisk_estimator_msgs::msg::EstimatedState,
obelisk_sensor_msgs::msg::JointEncoders, obelisk_sensor_msgs::msg::TrueSimState,
obelisk_sensor_msgs::msg::MujocoImage, obelisk_std_msgs::msg::FloatMultiArray,
obelisk_sensor_msgs::msg::ObkImage, obelisk_std_msgs::msg::FloatMultiArray,
obelisk_std_msgs::msg::UInt8MultiArray>;
// Allowed non-obelisk message types
using ROSAllowedMsgs = std::tuple<rcl_interfaces::msg::ParameterEvent>;

inline const std::array<std::string, 3> sensor_message_names = {
obelisk_sensor_msgs::msg::JointEncoders::MESSAGE_NAME, obelisk_sensor_msgs::msg::TrueSimState::MESSAGE_NAME,
obelisk_sensor_msgs::msg::MujocoImage::MESSAGE_NAME};
obelisk_sensor_msgs::msg::ObkImage::MESSAGE_NAME};

inline const std::array<std::string, 1> estimator_message_names = {
obelisk_estimator_msgs::msg::EstimatedState::MESSAGE_NAME};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find_package(obelisk_std_msgs REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/JointEncoders.msg"
"msg/TrueSimState.msg"
"msg/MujocoImage.msg"
"msg/ObkImage.msg"
DEPENDENCIES
std_msgs
obelisk_std_msgs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
string MESSAGE_NAME="MujocoImage"
string MESSAGE_NAME="ObkImage"
obelisk_std_msgs/UInt8MultiArray y
2 changes: 1 addition & 1 deletion tests/tests_python/tests_core/test_utils/test_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def test_conversion() -> None:
"""Test the conversion between numpy array and FloatMultiArray."""
arr = np.random.rand(3, 4, 5)
arr = np.random.rand(3, 4, 5, 6, 7)
msg = np_to_multiarray(arr)
assert isinstance(msg, FloatMultiArray)
arr_recovered = multiarray_to_np(msg)
Expand Down

0 comments on commit 54e02ec

Please sign in to comment.