From cba1967621f5599ca6070b9862975d0110bf720a Mon Sep 17 00:00:00 2001 From: Raphael Chang Date: Thu, 10 Mar 2016 01:24:54 +0000 Subject: [PATCH] Renaming --- CMakeLists.txt | 2 +- launch/example.launch | 12 ++++++------ launch/video_chat_demo.launch | 2 +- package.xml | 6 +++--- src/client_node.py | 16 ++++++++++------ 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c1783b..d5cff78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8.3) -project(roscloud_client) +project(canopy_client) find_package(catkin REQUIRED COMPONENTS rospy diff --git a/launch/example.launch b/launch/example.launch index 4ca18e5..dc3fb7c 100644 --- a/launch/example.launch +++ b/launch/example.launch @@ -1,8 +1,8 @@ - - - + + + @@ -10,7 +10,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/launch/video_chat_demo.launch b/launch/video_chat_demo.launch index 9e91ada..367ca2f 100644 --- a/launch/video_chat_demo.launch +++ b/launch/video_chat_demo.launch @@ -1,6 +1,6 @@ - + diff --git a/package.xml b/package.xml index 0edf80b..671656f 100644 --- a/package.xml +++ b/package.xml @@ -1,11 +1,11 @@ - roscloud_client + canopy_client 0.0.1 - ROS Cloud Robotics Framework + Canopy - The ROS Cloud Robotics Framework Alex Wallar GPLv3 - http://github.com/roscloud/roscloud_client + http://github.com/canopy-ros/canopy_client catkin rospy std_msgs diff --git a/src/client_node.py b/src/client_node.py index 0d1b551..39c28e4 100755 --- a/src/client_node.py +++ b/src/client_node.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Defines the ROSCloudNode class. +# Defines the CanopyClientNode class. import rospy import time @@ -9,12 +9,12 @@ import threading -NODE_NAME = "roscloud_client" +NODE_NAME = "canopy_client" -# The ROS node object for the ROSCloud client. +# The ROS node object for the Canopy client. # Manages all connections and subscribing. # One instance per client node. -class ROSCloudNode(object): +class CanopyClientNode(object): def __init__(self, host, port, name, broadcasting, private_key, description): self.host = host @@ -33,12 +33,16 @@ def __init__(self, host, port, name, broadcasting, private_key, description): # Creates all connections and subscribers and starts them. # Runs a loop that checks for received messages. def run(self): + if self.name.startswith("canopy_leaflet_"): + rospy.logerr("{}: names starting with 'canopy_leaflet_'" + " are reserved".format(self.name)) + return for topic, msg_type, trusted in self.broadcasting: if topic[0] != "/": topic = "/" + topic self.create_subscriber(topic, msg_type, trusted) if topic == "/receiving": - rospy.logerror("{}: topic name 'receiving' is reserved".format( + rospy.logerr("{}: topic name 'receiving' is reserved".format( self.name)) continue self.conn[topic] = Connection(host, port, "{}{}".format( @@ -114,6 +118,6 @@ def descriptionSend(self): private_key = rospy.get_param("~private_key") description = rospy.get_param("~description") broadcasting = zip(topics, types, trusted) - rcn = ROSCloudNode(host, port, name, broadcasting, private_key, + rcn = CanopyClientNode(host, port, name, broadcasting, private_key, description) rcn.run()