Skip to content

Commit

Permalink
Install only what's necessary, rename builtin_interfaces (#95)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Jul 23, 2020
1 parent 2056911 commit bf7bccb
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 51 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ sudo: required

env:
matrix:
- DOCKER_IMAGE=ubuntu:18.04 IGN_COLLECTION="blueprint" ROS_DISTRO="dashing"
- DOCKER_IMAGE=ubuntu:18.04 IGN_COLLECTION="blueprint" ROS_DISTRO="eloquent"
- DOCKER_IMAGE=ubuntu:18.04 IGN_COLLECTION="citadel" ROS_DISTRO="dashing"
- DOCKER_IMAGE=ubuntu:18.04 IGN_COLLECTION="citadel" ROS_DISTRO="eloquent"
- DOCKER_IMAGE=ubuntu:18.04 IGNITION_VERSION="blueprint" ROS_DISTRO="dashing"
- DOCKER_IMAGE=ubuntu:18.04 IGNITION_VERSION="blueprint" ROS_DISTRO="eloquent"
- DOCKER_IMAGE=ubuntu:18.04 IGNITION_VERSION="citadel" ROS_DISTRO="dashing"
- DOCKER_IMAGE=ubuntu:18.04 IGNITION_VERSION="citadel" ROS_DISTRO="eloquent"

services:
- docker
Expand All @@ -17,10 +17,10 @@ compiler:

before_install:
- echo $DOCKER_IMAGE
- echo $IGN_COLLECTION
- echo $IGNITION_VERSION
- echo $ROS_DISTRO
- docker pull $DOCKER_IMAGE
- docker run -e IGN_COLLECTION -e ROS_DISTRO -d -v $(pwd):/code $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done'
- docker run -e IGNITION_VERSION -e ROS_DISTRO -d -v $(pwd):/code $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done'
- docker exec $(docker ps -aq) /bin/bash -c 'id'

before_script:
Expand Down
4 changes: 2 additions & 2 deletions .travis/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export COLCON_WS=~/ws
export COLCON_WS_SRC=${COLCON_WS}/src
export DEBIAN_FRONTEND=noninteractive

if [ "$IGN_COLLECTION" == "blueprint" ]; then
if [ "$IGNITION_VERSION" == "blueprint" ]; then
IGN_DEPS="libignition-msgs4-dev libignition-transport7-dev libignition-gazebo2-dev"
elif [ "$IGN_COLLECTION" == "citadel" ]; then
elif [ "$IGNITION_VERSION" == "citadel" ]; then
IGN_DEPS="libignition-msgs5-dev libignition-transport8-dev libignition-gazebo3-dev"
else
exit 1
Expand Down
4 changes: 2 additions & 2 deletions ros_ign_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ endif()
include_directories(include)

set(common_sources
src/convert_builtin_interfaces.cpp
src/builtin_interfaces_factories.cpp
src/convert.cpp
src/factories.cpp
)

set(bridge_executables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_IGN_BRIDGE__CONVERT_BUILTIN_INTERFACES_HPP_
#define ROS_IGN_BRIDGE__CONVERT_BUILTIN_INTERFACES_HPP_
#ifndef ROS_IGN_BRIDGE__CONVERT_HPP_
#define ROS_IGN_BRIDGE__CONVERT_HPP_

#include <rclcpp/time.hpp>

// include ROS 2 builtin messages
// ROS 2 messages
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
Expand All @@ -41,7 +41,7 @@
#include <std_msgs/msg/float32.hpp>
#include <std_msgs/msg/string.hpp>

// include Ignition builtin messages
// Ignition messages
#include <ignition/msgs.hh>

#include <ros_ign_bridge/convert_decl.hpp>
Expand Down Expand Up @@ -359,4 +359,4 @@ convert_ign_to_ros(

} // namespace ros_ign_bridge

#endif // ROS_IGN_BRIDGE__CONVERT_BUILTIN_INTERFACES_HPP_
#endif // ROS_IGN_BRIDGE__CONVERT_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_IGN_BRIDGE__BRIDGE_HPP_
#define ROS_IGN_BRIDGE__BRIDGE_HPP_
#ifndef BRIDGE_HPP_
#define BRIDGE_HPP_

// include Ignition Transport
#include <ignition/transport/Node.hh>

#include <ros_ign_bridge/builtin_interfaces_factories.hpp>

#include <memory>
#include <string>

#include "factories.hpp"

namespace ros_ign_bridge
{

Expand Down Expand Up @@ -110,4 +110,4 @@ create_bidirectional_bridge(

} // namespace ros_ign_bridge

#endif // ROS_IGN_BRIDGE__BRIDGE_HPP_
#endif // BRIDGE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <ros_ign_bridge/convert_builtin_interfaces.hpp>
#include "ros_ign_bridge/convert.hpp"

#include <limits>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
#include <memory>
#include <string>

// include builtin interfaces
#include "ros_ign_bridge/builtin_interfaces_factories.hpp"
#include "ros_ign_bridge/convert_builtin_interfaces.hpp"
#include "factories.hpp"
#include "ros_ign_bridge/convert.hpp"

namespace ros_ign_bridge
{

std::shared_ptr<FactoryInterface>
get_factory_builtin_interfaces(
get_factory_impl(
const std::string & ros_type_name,
const std::string & ign_type_name)
{
Expand Down Expand Up @@ -289,7 +288,7 @@ get_factory(
const std::string & ign_type_name)
{
std::shared_ptr<FactoryInterface> factory;
factory = get_factory_builtin_interfaces(ros_type_name, ign_type_name);
factory = get_factory_impl(ros_type_name, ign_type_name);
if (factory) {
return factory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_IGN_BRIDGE__BUILTIN_INTERFACES_FACTORIES_HPP_
#define ROS_IGN_BRIDGE__BUILTIN_INTERFACES_FACTORIES_HPP_
#ifndef FACTORIES_HPP_
#define FACTORIES_HPP_

// include ROS 2 messages
// ROS 2 messages
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
Expand All @@ -39,22 +39,16 @@
#include <std_msgs/msg/float32.hpp>
#include <std_msgs/msg/string.hpp>

// include Ignition Transport messages
// Ignition messages
#include <ignition/msgs.hh>

#include <ros_ign_bridge/factory.hpp>

#include <memory>
#include <string>

#include "factory.hpp"

namespace ros_ign_bridge
{

std::shared_ptr<FactoryInterface>
get_factory_builtin_interfaces(
const std::string & ros_type_name,
const std::string & ign_type_name);

std::shared_ptr<FactoryInterface>
get_factory(
const std::string & ros_type_name,
Expand Down Expand Up @@ -522,4 +516,4 @@ Factory<

} // namespace ros_ign_bridge

#endif // ROS_IGN_BRIDGE__BUILTIN_INTERFACES_FACTORIES_HPP_
#endif // FACTORIES_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_IGN_BRIDGE__FACTORY_HPP_
#define ROS_IGN_BRIDGE__FACTORY_HPP_
#ifndef FACTORY_HPP_
#define FACTORY_HPP_

#include <ignition/transport/Node.hh>

Expand All @@ -24,7 +24,7 @@
#include <memory>
#include <string>

#include "ros_ign_bridge/factory_interface.hpp"
#include "factory_interface.hpp"

namespace ros_ign_bridge
{
Expand Down Expand Up @@ -149,4 +149,4 @@ class Factory : public FactoryInterface

} // namespace ros_ign_bridge

#endif // ROS_IGN_BRIDGE__FACTORY_HPP_
#endif // FACTORY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_IGN_BRIDGE__FACTORY_INTERFACE_HPP_
#define ROS_IGN_BRIDGE__FACTORY_INTERFACE_HPP_
#ifndef FACTORY_INTERFACE_HPP_
#define FACTORY_INTERFACE_HPP_

// include ROS 2
#include <rclcpp/rclcpp.hpp>
Expand Down Expand Up @@ -63,4 +63,4 @@ class FactoryInterface

} // namespace ros_ign_bridge

#endif // ROS_IGN_BRIDGE__FACTORY_INTERFACE_HPP_
#endif // FACTORY_INTERFACE_HPP_
4 changes: 2 additions & 2 deletions ros_ign_bridge/src/parameter_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
// include Ignition Transport
#include <ignition/transport/Node.hh>

#include <ros_ign_bridge/bridge.hpp>

#include <iostream>
#include <list>
#include <memory>
#include <string>
#include <vector>

#include "bridge.hpp"

// Direction of bridge.
enum Direction
{
Expand Down
4 changes: 2 additions & 2 deletions ros_ign_bridge/src/static_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
// include Ignition Transport
#include <ignition/transport/Node.hh>

#include <ros_ign_bridge/bridge.hpp>

#include <memory>
#include <string>

#include "bridge.hpp"

//////////////////////////////////////////////////
int main(int argc, char * argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion ros_ign_image/src/image_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <rclcpp/rclcpp.hpp>
#include <image_transport/image_transport.h>
#include <ros_ign_bridge/convert_builtin_interfaces.hpp>
#include <ros_ign_bridge/convert.hpp>

#include <iostream>
#include <memory>
Expand Down

0 comments on commit bf7bccb

Please sign in to comment.