Skip to content

Commit

Permalink
Fixed style errors
Browse files Browse the repository at this point in the history
Signed-off-by: William Lew <[email protected]>
  • Loading branch information
WilliamLewww committed Dec 22, 2021
1 parent 19e3c23 commit ccf734a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions ros_ign_bridge/src/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ convert_ros_to_ign(
ign_msg.set_type(ignition::msgs::Light_LightType::Light_LightType_SPOT);
} else if (ros_msg.type == 2) {
ign_msg.set_type(
ignition::msgs::Light_LightType::Light_LightType_DIRECTIONAL);
ignition::msgs::Light_LightType::Light_LightType_DIRECTIONAL);
}

convert_ros_to_ign(ros_msg.pose, *ign_msg.mutable_pose());
Expand Down Expand Up @@ -98,13 +98,16 @@ convert_ign_to_ros(

ros_msg.name = ign_msg.name();
if (ign_msg.type() ==
ignition::msgs::Light_LightType::Light_LightType_POINT) {
ignition::msgs::Light_LightType::Light_LightType_POINT)
{
ros_msg.type = 0;
} else if (ign_msg.type() ==
ignition::msgs::Light_LightType::Light_LightType_SPOT) {
ignition::msgs::Light_LightType::Light_LightType_SPOT)
{
ros_msg.type = 1;
} else if (ign_msg.type() ==
ignition::msgs::Light_LightType::Light_LightType_DIRECTIONAL) {
ignition::msgs::Light_LightType::Light_LightType_DIRECTIONAL)
{
ros_msg.type = 2;
}

Expand All @@ -122,9 +125,9 @@ convert_ign_to_ros(
ros_msg.spot_falloff = ign_msg.spot_falloff();

ros_msg.id = ign_msg.id();

ros_msg.parent_id = ign_msg.parent_id();

ros_msg.intensity = ign_msg.intensity();
}

Expand Down
4 changes: 2 additions & 2 deletions ros_ign_bridge/src/factories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ get_factory_impl(
const std::string & ign_type_name)
{
// mapping from string to specialized template
if ((ros_type_name == "ros_ign_interfaces/msg/Light" ||
if ((ros_type_name == "ros_ign_interfaces/msg/Light" ||
ros_type_name.empty()) && ign_type_name == "ignition.msgs.Light")
{
return std::make_shared<
Expand All @@ -37,7 +37,7 @@ get_factory_impl(
>
>("ros_ign_interfaces/msg/Light", ign_type_name);
}
if ((ros_type_name == "std_msgs/msg/ColorRGBA" ||
if ((ros_type_name == "std_msgs/msg/ColorRGBA" ||
ros_type_name.empty()) && ign_type_name == "ignition.msgs.Color")
{
return std::make_shared<
Expand Down
2 changes: 1 addition & 1 deletion ros_ign_bridge/test/launch/test_ign_subscriber.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def generate_test_description():
class IgnSubscriberTest(unittest.TestCase):

def test_termination(self, process_under_test, proc_info):
proc_info.assertWaitForShutdown(process=process_under_test, timeout=500)
proc_info.assertWaitForShutdown(process=process_under_test, timeout=200)


@launch_testing.post_shutdown_test()
Expand Down
2 changes: 1 addition & 1 deletion ros_ign_bridge/test/launch/test_ros_subscriber.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def generate_test_description():
class ROSSubscriberTest(unittest.TestCase):

def test_termination(self, process_under_test, proc_info):
proc_info.assertWaitForShutdown(process=process_under_test, timeout=500)
proc_info.assertWaitForShutdown(process=process_under_test, timeout=200)


@launch_testing.post_shutdown_test()
Expand Down

0 comments on commit ccf734a

Please sign in to comment.