Skip to content

Commit

Permalink
Merge pull request #59 from lge-ros2/main
Browse files Browse the repository at this point in the history
Merge into humble
  • Loading branch information
hyunseok-yang authored Apr 24, 2023
2 parents 8c27810 + 87ae4bd commit a344b1a
Show file tree
Hide file tree
Showing 25 changed files with 40 additions and 36 deletions.
2 changes: 1 addition & 1 deletion cloisim_ros_actor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_actor</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>node for actor plugin</description>

<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
4 changes: 0 additions & 4 deletions cloisim_ros_base/include/cloisim_ros_base/camera_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,11 @@ static cloisim::msgs::CameraSensor GetCameraSensorMessage(

cloisim::msgs::CameraSensor cameraSensorInfo;
if (reply.size() <= 0)
{
DBG_SIM_ERR("Failed to get camera info, length(%ld)", reply.size());
}
else
{
if (cameraSensorInfo.ParseFromString(reply) == false)
{
DBG_SIM_ERR("Failed to Parsing Proto buffer buffer_ptr(%p) length(%ld)", reply.data(), reply.size());
}
}

return cameraSensorInfo;
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_base/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_base</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>CLOiSim-ROS base class for other CLOiSim-ROS</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
5 changes: 2 additions & 3 deletions cloisim_ros_base/src/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ void Base::GetRos2Parameter(zmq::Bridge* const bridge_ptr)
return;

const auto reply = RequestReplyMessage(bridge_ptr, "request_ros2");

if (reply.ByteSizeLong() <= 0)
DBG_SIM_ERR("Failed to get ROS2 common info, length(%ld)", reply.ByteSizeLong());
else
{
if (reply.IsInitialized() && reply.name() == "ros2")
{
Expand All @@ -253,8 +254,6 @@ void Base::GetRos2Parameter(zmq::Bridge* const bridge_ptr)
}
}
}
else
DBG_SIM_ERR("Failed to get ROS2 common info, length(%ld)", reply.ByteSizeLong());
}
}

Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bridge_zmq/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bridge_zmq</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>bridge for cloisim(simulator) connection through ZMQ</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bringup</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>Bringup scripts and configurations for cloisim_ros</description>

<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
4 changes: 2 additions & 2 deletions cloisim_ros_bringup/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void make_bringup_list(const Json::Value result_map, const string target_model,

void remove_all_bringup_nodes(rclcpp::Executor& executor, const rclcpp::Logger& logger)
{
ERR(logger, "Remove all nodes=" << g_node_map_list.size());
ERR(logger, "Remove all nodes(" << g_node_map_list.size() << ")");
for (auto it = g_node_map_list.cbegin(); it != g_node_map_list.cend(); it++)
{
const auto& key = it->first;
Expand All @@ -40,7 +40,7 @@ void remove_all_bringup_nodes(rclcpp::Executor& executor, const rclcpp::Logger&
const auto node = get<2>(value);
executor.remove_node(node);
const auto node_info = get<0>(key) + "/" + get<1>(key) + "/" + get<2>(key);
WARN(logger, " > Node removed=" << node_info);
WARN(logger, "> Node(" << node_info << ") removed");
}

g_node_map_list.clear();
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_bringup_param/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_bringup_param</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>Bringup scripts and configurations for cloisim_ros</description>

<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_camera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_camera</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual camera for cloisim</description>
<maintainer email="[email protected]">Sungkyu Kang</maintainer>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_depthcamera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_depthcamera</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual depth camera for simulator</description>
<maintainer email="[email protected]">Sungkyu Kang</maintainer>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_elevator_system/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_elevator_system</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>elevator system for simulation</description>

<maintainer email="[email protected]">Sungkyu Kang</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_gps/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_gps</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual gps for simulation</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_ground_truth/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_ground_truth</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>world plugin to retrieve ground truth</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_imu/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_imu</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual gps for simulation</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_joint_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_joint_control</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>joint_control package for simulator</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_lidar/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_lidar</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual lidar for simulation</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_micom/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_micom</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>micom package for simulator</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_msgs</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>interfaces package for cloisim_ros</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>

Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_multicamera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_multicamera</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual multi-camera for simulator</description>
<maintainer email="[email protected]">Sungkyu Kang</maintainer>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
18 changes: 14 additions & 4 deletions cloisim_ros_multicamera/src/multicamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void MultiCamera::Initialize()

// Image publisher
const auto topic_base_name_ = GetPartsName() + "/" + frame_id;
DBG_SIM_INFO("topic_base_name:%s", topic_base_name_.c_str());
// DBG_SIM_INFO("topic_base_name: %s", topic_base_name_.c_str());

sensor_msgs::msg::Image msg_img;
msg_img.header.frame_id = frame_id;
Expand All @@ -88,14 +88,16 @@ void MultiCamera::Initialize()

void MultiCamera::Deinitialize()
{
for (auto pub_ : pubs_)
{
for (auto &pub_ : pubs_)
pub_.shutdown();
}
pubs_.clear();
}

void MultiCamera::PublishData(const string &buffer)
{
if (pubs_.size() == 0)
return;

if (!pb_buf_.ParseFromString(buffer))
{
DBG_SIM_ERR("Parsing error, size(%d)", buffer.length());
Expand All @@ -104,6 +106,13 @@ void MultiCamera::PublishData(const string &buffer)

SetTime(pb_buf_.time());

if (int(camera_info_manager_.size()) != pb_buf_.image_size())
{
DBG_SIM_ERR("camera_info_manager is not ready for multi-camera %d != %d",
camera_info_manager_.size(), pb_buf_.image_size());
return;
}

for (auto i = 0; i < pb_buf_.image_size(); i++)
{
auto img = &pb_buf_.image(i);
Expand All @@ -120,6 +129,7 @@ void MultiCamera::PublishData(const string &buffer)
// Publish camera info
auto camera_info_msg = camera_info_manager_[i]->getCameraInfo();
camera_info_msg.header.stamp = GetTime();

pubs_.at(i).publish(*msg_img, camera_info_msg);
}
}
2 changes: 1 addition & 1 deletion cloisim_ros_protobuf_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_protobuf_msgs</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>CLOiSim-ROS interafces for communication between simulator and CLOiSim-ROS</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_realsense/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_realsense</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>virtual realsense for simulator</description>
<maintainer email="[email protected]">Sungkyu Kang</maintainer>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
Expand Down
5 changes: 2 additions & 3 deletions cloisim_ros_realsense/src/realsense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,9 @@ void RealSense::InitializeImu(zmq::Bridge* const info_ptr, zmq::Bridge* const da

void RealSense::Deinitialize()
{
for (auto pub : pubs_)
{
for (auto& pub : pubs_)
pub.second.shutdown();
}
pubs_.clear();
}

void RealSense::GetActivatedModules(zmq::Bridge* const bridge_ptr)
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_websocket_service/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_websocket_service</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>websocket service for cloisim(simulator) connection port control</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down
2 changes: 1 addition & 1 deletion cloisim_ros_world/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>cloisim_ros_world</name>
<version>3.2.0</version>
<version>3.2.1</version>
<description>Utilities to interface with Unity through ROS.</description>
<maintainer email="[email protected]">Hyunseok Yang</maintainer>
<author email="[email protected]">Hyunseok Yang</author>
Expand Down

0 comments on commit a344b1a

Please sign in to comment.