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

mikemodanoxxx's profile - activity

2021-05-08 05:01:40 -0500 received badge  Famous Question (source)
2021-02-15 22:35:45 -0500 received badge  Notable Question (source)
2020-12-07 04:56:31 -0500 received badge  Popular Question (source)
2020-12-04 14:33:33 -0500 asked a question rospy types of message subfields

rospy types of message subfields Hi, I generate an empty instance of a message type, e.g via genpy.message.get_message_

2015-10-01 13:55:49 -0500 received badge  Notable Question (source)
2013-12-12 23:01:06 -0500 received badge  Popular Question (source)
2013-03-04 05:04:53 -0500 asked a question rosbuild_add_compile_flags does not work

Hi there,

i have multiple targets in my CMakeLists.txt (C++ and C targets) and would like to set different compiler flags for each target.

add_definitions() works, but it conflicts with other targets in the project:

rosbuild_add_library(Libname ${SRCS}) add_definitions("-std=c++0x")

I replaced the add_definitions() with rosbuild_add_compile_flags(Libname "-std=c++0x") but he seems to ignore the command. Am I missing something?

2012-11-20 13:08:47 -0500 received badge  Taxonomist
2012-11-13 04:11:35 -0500 received badge  Famous Question (source)
2012-11-05 22:06:37 -0500 commented answer Calling ros::spin from a new Thread

What i forgot to mention is, that another part of the application uses the orocos_ros_integration which is doing some ros interaction. In addition to that i want to use a normal subscriber. Is that even possible? I think my code worked before I integrated it into the code with the orocos integration

2012-11-05 19:43:05 -0500 received badge  Notable Question (source)
2012-11-05 12:00:12 -0500 received badge  Popular Question (source)
2012-11-05 04:51:03 -0500 asked a question Calling ros::spin from a new Thread

Hi there,

i have a strange problem with ROS. I am trying to subscribe to a ros topic in my application. Since the spin-method blocks the application i just started a new thread and tried to subscribe to the topic within this new thread. Here is my code:

void MatlabDevice::startROSCommunication() {
    boost::thread t(&MatlabDevice::startROSThread, this);
}

void MatlabDevice::startROSThread() {
    ros::NodeHandle nodeH;
    nodeH.subscribe("chatter", 1000, &MatlabDevice::callbackBodyMessage, this);
    ros::spin();
}

void MatlabDevice::callbackBodyMessage(const biorob_msgs::BioBipedBody::ConstPtr &msg) {
   // Further code here
}

The strange thing is that this worked some time ago. Now i get the following error:

[ERROR] [1352133007.566663012]: SingleThreadedSpinner: You've attempted to call spin from multiple threads.  Use a MultiThreadedSpinner instead.

I tried to remove the spin() call and used the MultiThreadedSpinner but this gives me:

[ERROR] [1352133281.107900251]: MultiThreadeSpinner: You've attempted to call ros::spin from multiple threads... but this spinner is already multithreaded.

Can someone tell me whats wrong with my code?

Greetings, Simon.

2012-08-20 19:31:24 -0500 received badge  Popular Question (source)
2012-08-20 19:31:24 -0500 received badge  Notable Question (source)
2012-08-20 19:31:24 -0500 received badge  Famous Question (source)
2012-08-15 05:19:47 -0500 received badge  Popular Question (source)
2012-08-15 05:19:47 -0500 received badge  Notable Question (source)
2012-08-15 05:19:47 -0500 received badge  Famous Question (source)
2012-06-12 00:10:50 -0500 received badge  Supporter (source)
2012-05-12 07:43:37 -0500 received badge  Scholar (source)
2012-05-12 07:42:53 -0500 answered a question Matlab-ROS Communication with ipc_bridge_ros

Thanks i switched to ubuntu 10.04 and had to compile gcc-4.2 by myself (i didn't find any packages to install it, where did you get it from btw?) and now it works. I hope there will be a better solution soon. I will continue trying to get it work with newer ubuntu versions and without the old gcc-compiler..

2012-05-07 05:57:44 -0500 received badge  Nice Question (source)
2012-05-05 09:06:26 -0500 received badge  Student (source)
2012-05-05 07:22:25 -0500 answered a question Matlab-ROS Communication with ipc_bridge_ros

Ok thanks, i'll give it a try. Have you tried to communicate between ros and matlab without the ipc bridge? I was wondering why you need the bridge since you can access Matlab with normal C++ code. I tried it today and faced a similar problem that you had on your third point.

2012-05-05 05:28:44 -0500 received badge  Editor (source)
2012-05-05 05:28:18 -0500 asked a question Matlab Engine and ROS Library Incompatible?

Hi there,

i am trying to establich a connection between Matlab 2012a and ROS fuerte. For the beginning i tried to modify the Listener/Talker tutorial. I just included the matlab api in the listener.cpp. It took me some time until i could compile the package with make. I changed the CMakeLists.txt in the beginner_tutorials folder in the following way and it seemed to work:

include_directories(/usr/local/MATLAB/R2012a/extern/include)
link_directories(/usr/local/MATLAB/R2012a/bin/glnx86)
link_directories(/usr/local/MATLAB/R2012a/sys/os/glnx86)

target_link_libraries(listener libeng.so)

But when i want to start a node now, i get the following errors:

/home/simon/ros_workspace/beginner_tutorials/bin/listener: /usr/local/MATLAB/R2012a/bin/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/ros/fuerte/lib/libroscpp.so)

Are there some libs that are incompatible? Is there a way to fix that?

2012-05-04 03:53:40 -0500 asked a question Matlab-ROS Communication with ipc_bridge_ros

Hi there,

i just installed ROS fuerte (ubuntu 11.10 32bit) and now i am trying to establish a connection between matlab and ros. I found this tutorial. Is there a better way to get it working? It was the only solution i found in the web. I started the tutorial and it worked well until point 7. I can't compile the message folders. The first one seems to work, but the second gives me a long error list. Is anyone familiar with the ipc_bridge? Here is the terminal output from the "roscd ipc_std_msgs && make" command:

bash -c "mkdir -p bin" bash -c "rospack find ipc_bridge/generate_msgs.sh ." Generating std_msgs_Bool.h mex -I./include -I/home/simon/ros_workspace/ipc_msgs/ipc_roslib/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge_matlab/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge/include -lstdc++ -L/home/simon/ros_workspace/ipc_bridge_stack/ipc/lib -lipc mex/std_msgs_Bool.cc -output bin/std_msgs_Bool

Warning: You are using gcc version "4.6.1-9ubuntu3)". The version currently supported with MEX is "4.4.6". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/

g++ -I./include -I/home/simon/ros_workspace/ipc_msgs/ipc_roslib/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge_ros/include -I/opt/ros/fuerte/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge/include -I/home/simon/ros_workspace/ipc_bridge_stack/ipc_bridge/include -lstdc++ -L/home/simon/ros_workspace/ipc_bridge_stack/ipc/lib -lipc -L/opt/ros/fuerte/lib -lroscpp -lrostime -lrosconsole -lroscpp_serialization -lxmlrpcpp ros/std_msgs_Bool_publisher.cc -o bin/std_msgs_Bool_publisher /tmp/cc4DJBiO.o: In function main': std_msgs_Bool_publisher.cc:(.text+0xc1): undefined reference toros::init(int&, char, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, unsigned int)' std_msgs_Bool_publisher.cc:(.text+0x123): undefined reference to ros::NodeHandle::NodeHandle(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)' std_msgs_Bool_publisher.cc:(.text+0x321): undefined reference toros::this_node::getName()' std_msgs_Bool_publisher.cc:(.text+0x372): undefined reference to ros::console::g_initialized' std_msgs_Bool_publisher.cc:(.text+0x381): undefined reference toros::console::initialize()' std_msgs_Bool_publisher.cc:(.text+0x3d2): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::console::levels::Level)' std_msgs_Bool_publisher.cc:(.text+0x40e): undefined reference toros::console::setLogLocationLevel(ros::console::LogLocation, ros::console::levels::Level)' std_msgs_Bool_publisher.cc:(.text+0x41a): undefined reference to ros::console::checkLogLocationEnabled(ros::console::LogLocation*)' std_msgs_Bool_publisher.cc:(.text+0x44b): undefined reference toros::this_node::getName()' std_msgs_Bool_publisher.cc:(.text+0x4a0): undefined reference to ros::console::print(ros::console::FilterBase*, log4cxx::Logger*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)' std_msgs_Bool_publisher.cc:(.text+0x4b1): undefined reference ... (more)