[ros-comm] 01/01: Set default master uri for roscpp as well
Jochen Sprickerhof
jspricke-guest at moszumanska.debian.org
Fri Mar 20 13:20:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
jspricke-guest pushed a commit to branch master
in repository ros-comm.
commit 7817d4a0261e99567cd7704fd70321860223b48b
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date: Fri Mar 20 14:00:45 2015 +0100
Set default master uri for roscpp as well
---
.../patches/0003-Add-default-ROS_MASTER_URI.patch | 36 ++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/debian/patches/0003-Add-default-ROS_MASTER_URI.patch b/debian/patches/0003-Add-default-ROS_MASTER_URI.patch
index 7bf4fa2..1870c70 100644
--- a/debian/patches/0003-Add-default-ROS_MASTER_URI.patch
+++ b/debian/patches/0003-Add-default-ROS_MASTER_URI.patch
@@ -3,9 +3,41 @@ Date: Fri, 12 Dec 2014 09:52:19 +0100
Subject: Add default ROS_MASTER_URI
---
- tools/rosgraph/src/rosgraph/rosenv.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ clients/roscpp/src/libros/master.cpp | 18 +++++++-----------
+ tools/rosgraph/src/rosgraph/rosenv.py | 5 ++++-
+ 2 files changed, 11 insertions(+), 12 deletions(-)
+diff --git a/clients/roscpp/src/libros/master.cpp b/clients/roscpp/src/libros/master.cpp
+index d0e4ef4..c25be66 100644
+--- a/clients/roscpp/src/libros/master.cpp
++++ b/clients/roscpp/src/libros/master.cpp
+@@ -63,19 +63,15 @@ void init(const M_string& remappings)
+ #else
+ master_uri_env = getenv("ROS_MASTER_URI");
+ #endif
+- if (!master_uri_env)
++
++ if (master_uri_env)
+ {
+- ROS_FATAL( "ROS_MASTER_URI is not defined in the environment. Either " \
+- "type the following or (preferrably) add this to your " \
+- "~/.bashrc file in order set up your " \
+- "local machine as a ROS master:\n\n" \
+- "export ROS_MASTER_URI=http://localhost:11311\n\n" \
+- "then, type 'roscore' in another shell to actually launch " \
+- "the master program.");
+- ROS_BREAK();
++ g_uri = master_uri_env;
++ }
++ else
++ {
++ g_uri = "http://localhost:11311";
+ }
+-
+- g_uri = master_uri_env;
+
+ #ifdef _MSC_VER
+ // http://msdn.microsoft.com/en-us/library/ms175774(v=vs.80).aspx
diff --git a/tools/rosgraph/src/rosgraph/rosenv.py b/tools/rosgraph/src/rosgraph/rosenv.py
index 93022f4..c3264d2 100644
--- a/tools/rosgraph/src/rosgraph/rosenv.py
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-comm.git
More information about the debian-science-commits
mailing list