diff --git a/cloisim_ros_actor/package.xml b/cloisim_ros_actor/package.xml index baf6a735..e362d8c4 100644 --- a/cloisim_ros_actor/package.xml +++ b/cloisim_ros_actor/package.xml @@ -2,7 +2,7 @@ cloisim_ros_actor - 3.4.1 + 3.4.2 node for actor plugin Hyunseok Yang diff --git a/cloisim_ros_base/package.xml b/cloisim_ros_base/package.xml index 4a7b1981..4deb173f 100644 --- a/cloisim_ros_base/package.xml +++ b/cloisim_ros_base/package.xml @@ -2,7 +2,7 @@ cloisim_ros_base - 3.4.1 + 3.4.2 CLOiSim-ROS base class for other CLOiSim-ROS Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_base/src/base.cpp b/cloisim_ros_base/src/base.cpp index 91438d33..6450344f 100644 --- a/cloisim_ros_base/src/base.cpp +++ b/cloisim_ros_base/src/base.cpp @@ -168,7 +168,10 @@ void Base::AddPublisherThread( int bufferLength = 0; const bool succeeded = GetBufferFromSimulator(bridge_ptr, &buffer_ptr, bufferLength); if (!succeeded || bufferLength < 0) + { + DBG_ERR("[%s] Failed to get buffer(%d) <= Sim, %s", get_name(), bufferLength, zmq_strerror(zmq_errno())); continue; + } if (IsRunThread() == false) break; diff --git a/cloisim_ros_bridge_zmq/include/cloisim_ros_bridge_zmq/log.h b/cloisim_ros_bridge_zmq/include/cloisim_ros_bridge_zmq/log.h index 0edcd58f..2bf43eb0 100644 --- a/cloisim_ros_bridge_zmq/include/cloisim_ros_bridge_zmq/log.h +++ b/cloisim_ros_bridge_zmq/include/cloisim_ros_bridge_zmq/log.h @@ -28,4 +28,13 @@ #define DBG_SIM_MSG(STR_FORMAT, ...) __SIM_LOG(GREEN, STR_FORMAT, ##__VA_ARGS__) #define DBG_SIM_ERR(STR_FORMAT, ...) __SIM_LOG(BOLDRED, STR_FORMAT, ##__VA_ARGS__) +#define __SIM_LOG_WITHOUT_FUNC(COLOR_CODE, STR_FORMAT, ...) \ + printf(COLOR_CODE STR_FORMAT RESET "\n", ##__VA_ARGS__) +// printf(COLOR_CODE "[%s][%d] " STR_FORMAT RESET "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) + +#define DBG_INFO(STR_FORMAT, ...) __SIM_LOG_WITHOUT_FUNC(CYAN, STR_FORMAT, ##__VA_ARGS__) +#define DBG_WRN(STR_FORMAT, ...) __SIM_LOG_WITHOUT_FUNC(YELLOW, STR_FORMAT, ##__VA_ARGS__) +#define DBG_MSG(STR_FORMAT, ...) __SIM_LOG_WITHOUT_FUNC(GREEN, STR_FORMAT, ##__VA_ARGS__) +#define DBG_ERR(STR_FORMAT, ...) __SIM_LOG_WITHOUT_FUNC(BOLDRED, STR_FORMAT, ##__VA_ARGS__) + #endif // CLOISIM_ROS_BRIDGE_ZMQ__LOG_H_ diff --git a/cloisim_ros_bridge_zmq/package.xml b/cloisim_ros_bridge_zmq/package.xml index 706fee8e..9c6aec1b 100644 --- a/cloisim_ros_bridge_zmq/package.xml +++ b/cloisim_ros_bridge_zmq/package.xml @@ -2,7 +2,7 @@ cloisim_ros_bridge_zmq - 3.4.1 + 3.4.2 bridge for cloisim(simulator) connection through ZMQ Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_bridge_zmq/src/bridge.cpp b/cloisim_ros_bridge_zmq/src/bridge.cpp index 15a88744..88c4da3e 100644 --- a/cloisim_ros_bridge_zmq/src/bridge.cpp +++ b/cloisim_ros_bridge_zmq/src/bridge.cpp @@ -412,7 +412,7 @@ bool Bridge::Receive(void **buffer, int &bufferLength, bool isNonBlockingMode) if ((bufferLength = zmq_msg_recv(&m_msgRx, pSockRx_, (isNonBlockingMode) ? ZMQ_DONTWAIT : 0)) < 0) { - DBG_SIM_ERR("Failed to receive message len(%d): %s", bufferLength, zmq_strerror(zmq_errno())); + // DBG_SIM_ERR("Failed to receive message len(%d): %s", bufferLength, zmq_strerror(zmq_errno())); return false; } diff --git a/cloisim_ros_bringup/package.xml b/cloisim_ros_bringup/package.xml index e7a2a781..f8a843d0 100644 --- a/cloisim_ros_bringup/package.xml +++ b/cloisim_ros_bringup/package.xml @@ -2,7 +2,7 @@ cloisim_ros_bringup - 3.4.1 + 3.4.2 Bringup scripts and configurations for cloisim_ros Hyunseok Yang diff --git a/cloisim_ros_bringup_param/package.xml b/cloisim_ros_bringup_param/package.xml index fb8857f1..3c97a591 100644 --- a/cloisim_ros_bringup_param/package.xml +++ b/cloisim_ros_bringup_param/package.xml @@ -2,7 +2,7 @@ cloisim_ros_bringup_param - 3.4.1 + 3.4.2 Bringup scripts and configurations for cloisim_ros Hyunseok Yang diff --git a/cloisim_ros_camera/package.xml b/cloisim_ros_camera/package.xml index 9c8c2d7b..e400c970 100644 --- a/cloisim_ros_camera/package.xml +++ b/cloisim_ros_camera/package.xml @@ -2,7 +2,7 @@ cloisim_ros_camera - 3.4.1 + 3.4.2 virtual camera for cloisim Sungkyu Kang Hyunseok Yang diff --git a/cloisim_ros_depthcamera/package.xml b/cloisim_ros_depthcamera/package.xml index 78ee52cb..d3434034 100644 --- a/cloisim_ros_depthcamera/package.xml +++ b/cloisim_ros_depthcamera/package.xml @@ -2,7 +2,7 @@ cloisim_ros_depthcamera - 3.4.1 + 3.4.2 virtual depth camera for simulator Sungkyu Kang Hyunseok Yang diff --git a/cloisim_ros_elevator_system/package.xml b/cloisim_ros_elevator_system/package.xml index 4bc80ef4..591c597d 100644 --- a/cloisim_ros_elevator_system/package.xml +++ b/cloisim_ros_elevator_system/package.xml @@ -2,7 +2,7 @@ cloisim_ros_elevator_system - 3.4.1 + 3.4.2 elevator system for simulation Sungkyu Kang diff --git a/cloisim_ros_gps/package.xml b/cloisim_ros_gps/package.xml index 0d1ab309..0d1992d1 100644 --- a/cloisim_ros_gps/package.xml +++ b/cloisim_ros_gps/package.xml @@ -2,7 +2,7 @@ cloisim_ros_gps - 3.4.1 + 3.4.2 virtual gps for simulation Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_ground_truth/package.xml b/cloisim_ros_ground_truth/package.xml index faaac4ab..2e866459 100644 --- a/cloisim_ros_ground_truth/package.xml +++ b/cloisim_ros_ground_truth/package.xml @@ -2,7 +2,7 @@ cloisim_ros_ground_truth - 3.4.1 + 3.4.2 world plugin to retrieve ground truth Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_imu/package.xml b/cloisim_ros_imu/package.xml index f3cb476e..faa791c0 100644 --- a/cloisim_ros_imu/package.xml +++ b/cloisim_ros_imu/package.xml @@ -2,7 +2,7 @@ cloisim_ros_imu - 3.4.1 + 3.4.2 virtual imu for simulation Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_joint_control/package.xml b/cloisim_ros_joint_control/package.xml index 0d417d08..42c03119 100644 --- a/cloisim_ros_joint_control/package.xml +++ b/cloisim_ros_joint_control/package.xml @@ -2,7 +2,7 @@ cloisim_ros_joint_control - 3.4.1 + 3.4.2 joint_control package for simulator Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_lidar/package.xml b/cloisim_ros_lidar/package.xml index 34fad140..b78c4ce7 100644 --- a/cloisim_ros_lidar/package.xml +++ b/cloisim_ros_lidar/package.xml @@ -2,7 +2,7 @@ cloisim_ros_lidar - 3.4.1 + 3.4.2 virtual lidar for simulation Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_micom/package.xml b/cloisim_ros_micom/package.xml index ee7881e1..e487d397 100644 --- a/cloisim_ros_micom/package.xml +++ b/cloisim_ros_micom/package.xml @@ -2,7 +2,7 @@ cloisim_ros_micom - 3.4.1 + 3.4.2 micom package for simulator Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_micom/src/micom.cpp b/cloisim_ros_micom/src/micom.cpp index 736c0374..afa14690 100644 --- a/cloisim_ros_micom/src/micom.cpp +++ b/cloisim_ros_micom/src/micom.cpp @@ -233,9 +233,12 @@ void Micom::UpdateImu() void Micom::UpdateBattery() { - msg_battery_.header.stamp = GetTime(); - msg_battery_.voltage = 0.0; - msg_battery_.current = 0.0; + if (pb_micom_.has_battery()) + { + msg_battery_.header.stamp = GetTime(); + msg_battery_.voltage = pb_micom_.battery().voltage(); + msg_battery_.current = 0.0; + } } } // namespace cloisim_ros diff --git a/cloisim_ros_msgs/package.xml b/cloisim_ros_msgs/package.xml index 73a38d59..e7160850 100644 --- a/cloisim_ros_msgs/package.xml +++ b/cloisim_ros_msgs/package.xml @@ -2,7 +2,7 @@ cloisim_ros_msgs - 3.4.1 + 3.4.2 interfaces package for cloisim_ros Hyunseok Yang diff --git a/cloisim_ros_multicamera/package.xml b/cloisim_ros_multicamera/package.xml index cbcb4dde..d6d67de3 100644 --- a/cloisim_ros_multicamera/package.xml +++ b/cloisim_ros_multicamera/package.xml @@ -2,7 +2,7 @@ cloisim_ros_multicamera - 3.4.1 + 3.4.2 virtual multi-camera for simulator Sungkyu Kang Hyunseok Yang diff --git a/cloisim_ros_protobuf_msgs/package.xml b/cloisim_ros_protobuf_msgs/package.xml index 1dde93e3..f9496baf 100644 --- a/cloisim_ros_protobuf_msgs/package.xml +++ b/cloisim_ros_protobuf_msgs/package.xml @@ -2,7 +2,7 @@ cloisim_ros_protobuf_msgs - 3.4.1 + 3.4.2 CLOiSim-ROS interafces for communication between simulator and CLOiSim-ROS Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_realsense/package.xml b/cloisim_ros_realsense/package.xml index be5af598..7a2501c3 100644 --- a/cloisim_ros_realsense/package.xml +++ b/cloisim_ros_realsense/package.xml @@ -2,7 +2,7 @@ cloisim_ros_realsense - 3.4.1 + 3.4.2 virtual realsense for simulator Sungkyu Kang Hyunseok Yang diff --git a/cloisim_ros_sonar/package.xml b/cloisim_ros_sonar/package.xml index bb1ad3c6..d80a02cb 100644 --- a/cloisim_ros_sonar/package.xml +++ b/cloisim_ros_sonar/package.xml @@ -2,7 +2,7 @@ cloisim_ros_sonar - 3.4.1 + 3.4.2 virtual sonar for simulation Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_websocket_service/package.xml b/cloisim_ros_websocket_service/package.xml index b74c899f..6d40b4cf 100644 --- a/cloisim_ros_websocket_service/package.xml +++ b/cloisim_ros_websocket_service/package.xml @@ -2,7 +2,7 @@ cloisim_ros_websocket_service - 3.4.1 + 3.4.2 websocket service for cloisim(simulator) connection port control Hyunseok Yang Hyunseok Yang diff --git a/cloisim_ros_world/package.xml b/cloisim_ros_world/package.xml index af2501ce..42581d9b 100644 --- a/cloisim_ros_world/package.xml +++ b/cloisim_ros_world/package.xml @@ -2,7 +2,7 @@ cloisim_ros_world - 3.4.1 + 3.4.2 Utilities to interface with Unity through ROS. Hyunseok Yang Hyunseok Yang