ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

TiagoRibeiro's profile - activity

2016-03-17 13:24:31 -0500 marked best answer Python - ROS - Windows

Breaking up several questions I asked here: http://answers.ros.org/question/45234/multiplatform-dotnet-ros-workflow-redistribution-issues/

Issue #2: Seems like WinRos Sdk is not working with python, as ROS doesn't find my package.

I failed to find a workflow on using ROS with python on windows - the tutorials point only to using cpp modules.

Is it possible to run python ROS in Windows? What should I run to get ROS to find the package (assuming it's written in python)?

2016-03-02 18:12:21 -0500 marked best answer IronPython and ROS

Breaking up several questions I asked in [http://answers.ros.org/question/45234/multiplatform-dotnet-ros-workflow-redistribution-issues/]

So issue #1: I have failed to load roslib into IronPython. Does anyone know if this can be solved? Here is my execution. I first run it with python, so you see it works, things are set up correctly. However, with ipy it doesn't find roslib.

Tiago-Ribeiros-MacBook-Pro:~ tiagoribeiro$ roscd SimplePerception/
Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$ python nodes/SimplePerceptionEffector.py
/opt/ros/fuerte/lib/python2.7/site-packages/ros_comm-1.8.12-py2.7.egg/rospy/topics.py:758: UserWarning: '\Perception\SimplePerception' is not a legal ROS graph resource name. This may cause problems with other ROS tools
[INFO] [WallTime: 1349574242.992873] hello world 1349574242.99
[INFO] [WallTime: 1349574243.994326] hello world 1349574243.99
^C

Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$ ipy nodes/SimplePerctionEffector.py
Traceback (most recent call last):
File "nodes/SimplePerceptionEffector.py", line 5, in <module>
ImportError: No module named roslib
Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$
2015-03-03 22:30:04 -0500 received badge  Famous Question (source)
2014-01-28 17:27:38 -0500 marked best answer Redistribute ROS-based library

Breaking up several questions I asked here: http://answers.ros.org/question/45234/multiplatform-dotnet-ros-workflow-redistribution-issues/

Issue #4: Last but not least, and this is really important on our final decision of using ROS or not: Me and my colleague are building and linking together a bunch of independent modules that provide behavior and expressivity control to characters independently of their mind or body, so our packages will be used to link different minds to different robots, and even to virtual characters in Unity3D.

The purpose of this is that anyone in our research lab that needs a character can use our stuff.

So even if we get this working, will we be able to redistribute our libraries running over ROS easily to someone who isn't familiarized with ROS, but just wants to use whatever we build over it?

I think this is an important question regarding my vision on the whole purpose of ROS: everything looks and works great, but it's a pain to install and setup. It definitely looks like something I don't want to depend on if I'm developing stuff for other people to use. And it is definitely something that would make me think twice before using something that depended on it - especially if I just develop cultural agents that just smile and run around inside a Unity3D scene and someone just says "hey I have this stuff here that will look great on your character, you just have to spend a couple of days going through this whole process of getting ROS to run on your machine/OS"

Is there any guide or workflow for redistributing a ROS-based library/application?

2014-01-28 17:27:36 -0500 marked best answer Multiplatform-dotNet-ROS workflow / redistribution issues

Hi all,

I have been looking into ROS during the last couple of weeks, understanding how it works. I've ran it in Ubuntu (the pre-installed VirtualBox), then got it installed in OSX (Mountain Lion) and Windows 7. So for so good, things seem to work as described, and ROS looks promising.

My interest in ROS is to use it as a communication layer between several things we've been developing at my research lab (and yes, those 'things' include robots :)

However, we are not a robotics team, but an intelligent agents and synthetic characters groups, so we are used to develop on high-level platforms.

So the thing is, we develop everything in dotNet, both in Windows and OSX, and now we would like to try to link everything using ROS, because ROS offers exactly the communication mechanisms that we need. We have actually nearly built our own communication layer with the same kind of subscribe/publish mechanisms for independent 'plug-in-play' modules until we found out ROS does this and much more (like all the tools you have, and also modules for the NAO robot, which we also use)

So what I ask is suggestions for a workflow on this - making several libraries that were developed in C# to communicate over ROS.

My first bet was that I could use IronPython to get my dotnet classes to communicate with the python script that launches the ros node. The python script would add a callback to the dotnet class' events in order to publish ros messages when a certain dotnet event was launched, and would run a method on the same class with the msg information whenever a subscribed message was received.

So issue #1: I have failed to load roslib into IronPython. Does anyone know if this can be solved? Here is my execution. I first run it with python, so you see it works, things are set up correctly. However, with ipy it doesn't find roslib.

Tiago-Ribeiros-MacBook-Pro:~ tiagoribeiro$ roscd SimplePerception/

Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$ python nodes/SimplePerceptionEffector.py

/opt/ros/fuerte/lib/python2.7/site-packages/ros_comm-1.8.12-py2.7.egg/rospy/topics.py:758: UserWarning: '\Perception\SimplePerception' is not a legal ROS graph resource name. This may cause problems with other ROS tools

[INFO] [WallTime: 1349574242.992873] hello world 1349574242.99

[INFO] [WallTime: 1349574243.994326] hello world 1349574243.99

^C

Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$ ipy nodes/SimplePerctionEffector.py

Traceback (most recent call last):

File "nodes/SimplePerceptionEffector.py", line 5, in <module>

ImportError: No module named roslib

Tiago-Ribeiros-MacBook-Pro:SimplePerception tiagoribeiro$

Issue #2: Even if I got this running, the WinRos Sdk is not working with python, as ROS doesn't find my package.

I failed to find a workflow on using ROS with python on windows - the tutorials point only to using cpp modules. So what should I run on windows to get ROS to find the package (assuming it's written in python)?

Issue #3: The previous issues make me realize that I might have to work with C++ and ... (more)

2014-01-28 17:27:35 -0500 marked best answer rosmake -a fails - boost symbols not found [Mountain Lion]

I have tried to install electric in Snow Leopard, but it failed due to not findind some symbols on the boost libraries. By that time I searched around for solutions, I installed the boost I had and installed 1.49, but still it failed. I upgraded to Mountain Lion and again tried installing electric, but failed with the same problem. So i tried to install fuerte, and again.. it fails with the same error.

So my current situation is fuerte + Mountain Lion, and I don't know how to solve this problem. I really want to use ROS on my research project, but it's turning out impossible to get it running. Already spent a whole week installing stuff and missing lib and dependencies and even a new OS.

Can anybody help here?

This is the ~/.ros/rosmake/ros_outputxxx/bondcpp/build_output.log file:

mkdir -p bin

cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake

..

-- The C compiler identification is GNU 4.2.1

-- The CXX compiler identification is Clang 4.1.0

-- Checking whether C compiler has -isysroot

-- Checking whether C compiler has -isysroot - yes

-- Checking whether C compiler supports OSX deployment target flag

-- Checking whether C compiler supports OSX deployment target flag - yes

-- Check for working C compiler: /usr/bin/gcc

-- Check for working C compiler: /usr/bin/gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Found PythonInterp: /usr/local/bin/python (found version "2.7.3")

[rosbuild] Building package bondcpp

[rosbuild] Cached build flags older than manifests; calling rospack to get flags

[rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake

[rosbuild] Including /opt/ros/fuerte/share/common-lisp/ros/roslisp/rosbuild/roslisp.cmake

[rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/tiagoribeiro/ros/bond_core/bondcpp/build

cd build && make -l4

Scanning dependencies of target rospack_genmsg_libexe

[ 0%] Built target rospack_genmsg_libexe

Scanning dependencies of target rosbuild_precompile

[ 0%] Built target rosbuild_precompile

Scanning dependencies of target bondcpp

[ 33%] Building CXX object CMakeFiles/bondcpp.dir/src/timeout.o

[ 66%] Building CXX object CMakeFiles/bondcpp.dir/src/bond.o

In file included from /Users/tiagoribeiro/ros/bond_core/bondcpp/src/bond.cpp:32:

/Users/tiagoribeiro/ros/bond_core/bondcpp/include/bondcpp/bond.h:186:1: warning: 'BondSM' defined as a struct here but previously declared as a class [-Wmismatched-tags]

struct BondSM^ /Users/tiagoribeiro/ros/bond_core/bondcpp/include/BondSM_sm.h:25:1: note: did you mean struct here?

class BondSM; ^~~~~ struct

1 warning generated.

[100%] Building CXX object CMakeFiles/bondcpp.dir/src/BondSM_sm.o

In file included from /Users/tiagoribeiro/ros/bond_core/bondcpp/src/BondSM_sm.cpp:8: /Users/tiagoribeiro/ros/bond_core/bondcpp/include/bondcpp/bond.h:186:1: warning: 'BondSM' defined as a struct here but previously declared as a class [-Wmismatched-tags]

struct BondSM ^ /Users/tiagoribeiro/ros/bond_core ... (more)

2013-10-01 07:20:00 -0500 received badge  Famous Question (source)
2013-04-18 10:35:33 -0500 received badge  Famous Question (source)
2013-04-18 10:35:31 -0500 received badge  Notable Question (source)
2013-03-26 06:26:19 -0500 received badge  Notable Question (source)
2012-12-04 10:10:13 -0500 received badge  Famous Question (source)
2012-11-19 05:19:30 -0500 received badge  Popular Question (source)
2012-11-10 13:00:35 -0500 received badge  Popular Question (source)
2012-11-07 08:40:43 -0500 commented answer MD5Sum for custom native type

Thank you very much! The reason for using ROS is that we are developing mid/high-level AI control for characters (robotic or virtual) but would like to be able to interface with ROS in order to be able to share and colaborate with other people that use ROS. Thanks for your answer! Going to try it.

2012-11-07 03:39:12 -0500 commented answer Can't use subscribe from inside c++ class

You are right. Can you please direct me to where I should post the ticket? I found the ticket handoffs but didn't quite understand where I should post this as a ticket.

2012-11-07 03:31:51 -0500 asked a question MD5Sum for custom native type

So I'm not sure if what I am trying to do is doable or not, but here it goes.

I want to be able to exchange serialized dotnet classes over ROS. (yes, you read it right :)

This is for a connector I am trying to build to make use of ROS over C# both on Windows and on OSX (roscs isn't enough because I don't have it in windows..)

So after the motivation, what I am trying to do is create my own native type in ros::std_msgs called Object, that would be able to carry a serialized class that I can later deserialize on reception (assuming both the sender and the receptor use the same class definition).

However, while trying to define this class, I see that I must define some values related to MD5 checksum. More specifically:

struct MD5Sum< ::std_msgs::Object_<ContainerAllocator> >
{
  static const char* value()
  {
    return "d41d8cd98f00b204e9800998ecf8427e"; 
  }

  static const char* value(const ::std_msgs::Object_<ContainerAllocator>&) { return value(); }
  static const uint64_t static_value1 = 0xd41d8cd98f00b204ULL;
  static const uint64_t static_value2 = 0xe9800998ecf8427eULL;
};

Where do these values come from?

Is it possible for me to generate them for my class?

Thanks for any help!

2012-11-05 03:25:42 -0500 received badge  Notable Question (source)
2012-11-04 09:18:43 -0500 received badge  Famous Question (source)
2012-11-04 03:47:15 -0500 marked best answer Can't use subscribe from inside c++ class

I am having trouble getting ros inside a c++ class. Running Windows 7, compiling with Visual Studio 2010.

I started by trying to adapt the "listener" project in rosws, which contains a visualstudio example that compiles and runs ok.

However, even if I simply put everything inside a class, I get this error:

Error   30  error C2660: 'ros::NodeHandle::subscribe' : function does not take 3 arguments  C:\opt\rosws\fuerte\sdk-tutorials\listener\listener.cpp 59  1   listener

This simple example replicates the problem:

#include "stdafx.h"
#include <iostream>
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <sstream>

class listener {
    public:
    void chatterCallback(const std_msgs::String::ConstPtr& msg)
    {
        ROS_INFO("I heard: [%s]", msg->data.c_str());
    }

    int mymain(int argc, char** argv)
    {
        ros::init(argc, argv, "listener");
        ros::NodeHandle n;
        ros::Subscriber sub = n.subscribe("chatter", 1000, &listener::chatterCallback);
        ros::spin();

        return 0;
    }
};

So you see that I am just sticking everything inside a class so that I can create and manipulate instances of my objects.

Why does the compiler not find the correct subscribe function now? If I just compile the code without the class, it works.

I checked out the "talker" project which used an "advertise" function, but that one works ok if I stick it inside a class.

2012-11-03 02:09:44 -0500 received badge  Student (source)
2012-11-03 02:09:34 -0500 received badge  Teacher (source)
2012-11-03 02:09:34 -0500 received badge  Self-Learner (source)
2012-11-02 23:17:11 -0500 received badge  Popular Question (source)