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

sgwhack's profile - activity

2017-03-04 08:22:28 -0500 marked best answer Problems with Int32MultiArrays

Hi,

I'm wondering if anyone knows what these errors mean:

My code is really long to post, so I was wondering if there was something general that these are getting at that I can look out for in my code.

I'm trying to pass std_msgs::Int32MultiArray::ConstPtr& arrays from a subscribed topic into a function to pull out the data.

Any help on this would be greatly appreciated!!

Edit: I am running ROS electric on Ubuntu 11.10.

Full Error Message:

/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:570:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, const boost::shared_ptr<U>&, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:618:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:663:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:706:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const VoidConstPtr&, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:752:14: note: template<class M, class C> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(C)>&, const VoidConstPtr&, const ros::TransportHints&)
  /home/gregory/ros_workspace/socbot/src/mainProcessing.cpp:111:133: error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [17], int, void (mainProcessing::*)(const ConstPtr&), mainProcessing* const)’
  /home/gregory/ros_workspace/socbot/src/mainProcessing.cpp:111:133: note: candidates are:
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:379:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:390:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M)const, T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:438:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:448:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, T*, const ros::TransportHints&)
  /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:498:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), const boost::shared_ptr<U>&, const ros::TransportHints&)
  /opt ...
(more)
2015-04-23 03:33:02 -0500 marked best answer Error using joystick_remapper

Hi, I'm trying to use the joystick_remapper, and I'm getting the following error every time I run the code:

[ERROR] [1349147615.365296561]: Client [/joystick2] wants topic /logitech to have datatype/md5sum [joy/Joy/e3ef016fcdf22397038b36036c66f7c8], but our version has [sensor_msgs/Joy/5a9ea5f83505693b71e785041e67a8bb]. Dropping connection.

My launch file looks like this:

<launch>

<node pkg="joy" type="joy_node" name="joystick1" >
  <remap from="joy" to="logitech" />
</node>

<node pkg="joystick_remapper" type="joystick_remapper.py" name="joystick2" >
  <remap from="joy_source" to="logitech" />
  <remap from="joy_des" to="joy" />
  <param name="button_mapping" type="str" value="=" />
  <param name="axis_mapping" type="str" value="=" />
</node>

</launch>

Can someone tell me how to make this work? Thanks!

2014-12-02 15:38:00 -0500 received badge  Famous Question (source)
2014-11-04 11:10:54 -0500 received badge  Famous Question (source)
2014-01-28 17:27:42 -0500 marked best answer Bluetooth Serial Errors

Hi,

1. I am trying to run an Arduino ROS node connected with a bluetooth serial link. I can get it connected, (with rosrun rosserial_python serial_node.py /dev/rfcomm0) but it won't stay connected for very long. I get the following error (repeatedly):

[ERROR] [WallTime: 1350185780.476810] bad callback: <bound method="" subscriber.callback="" of="" <rosserial_python.serialclient.subscriber="" instance="" at="" 0xa2b65cc="">> Traceback (most recent call last): File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/topics.py", line 581, in _invoke_callback cb(msg) File "/opt/ros/electric/stacks/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 121, in callback self.parent.send(self.id, data_buffer.getvalue()) File "/opt/ros/electric/stacks/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 473, in send self.port.write(data) File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 485, in write raise SerialException('write failed: %s' % (v,)) SerialException: write failed: [Errno 5] Input/output error

Has anyone seen this before and knows what to do about it?

2. Also, does any one know what this error means? I get it as I run my program, but I can receive messages from my Arduino regardless of if its showing...

[INFO] [WallTime: 1350185758.107044] Packet Failed : Failed to read msg data

2014-01-28 17:27:23 -0500 marked best answer Use PS3 Controller via USB

I was wondering if there were any libraries for ROS for using a PS3 controller through the USB connection instead of the Bluetooth connection? Or if it is even possible?

I looked at ps3joy, but it seems to only work via the bluetooth pairing.

Any suggestions?

2013-11-15 16:27:31 -0500 received badge  Taxonomist
2013-09-16 07:32:56 -0500 marked best answer rosserial communication between bluetooth and arduino

Hi,

I am trying to communicate wirelessly between an Arduino with a bluetooth shield and my computer using rosserial. When I use rosserial through the USB cable, everything works fine, but nothing works wirelessly. Also, I can send regular serial messages sometimes to Putty using the Arduino serial functions, Serial.begin(), Serial.Write(), etc. I just can't seem to make the Arduino a ROS node through bluetooth (though, as mentioned before it does work with a USB serial connection).

I setup my bluetooth connection using: sudo rfcomm bind 0 00:00:01:08:01:65 1

There is an LED on the shield that indicates when the bluetooth is connected, however the messages that I get from the terminal are:

rosrun rosserial_python serial_node.py /dev/rfcomm0 _baud:=9600

[INFO] [WallTime: 1342369406.985011] ROS Serial Python Node

[INFO] [WallTime: 1342369406.987303] Connected on /dev/rfcomm0 at 9600 baud

[ERROR] [WallTime: 1342369421.988484] Lost sync with device, restarting...

I have tried playing around with the baud rates to no avail.

Does anyone know how I can make this work?

2013-09-01 01:07:55 -0500 received badge  Nice Question (source)
2013-08-05 07:26:21 -0500 received badge  Famous Question (source)
2013-07-01 10:08:04 -0500 received badge  Notable Question (source)
2013-06-25 08:44:52 -0500 received badge  Popular Question (source)
2013-06-23 08:35:23 -0500 asked a question Install Groovy from Source failed on sbcl

I am trying to install groovy from source on my Beaglebone Black, Ubuntu 12.10. After following the instructions, I execute:

rosdep install --from-paths src --ignore-src --rosdistro groovy -y

And then I get the error:

executing command [sudo apt-get install -y sbcl]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sbcl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  sbcl-source sbcl-doc

E: Package 'sbcl' has no installation candidate
ERROR: the following rosdeps failed to install
  apt: command [sudo apt-get install -y sbcl] failed

It seems that sbcl is not available. Does anyone know how to get around this?

2013-05-30 07:46:57 -0500 received badge  Famous Question (source)
2013-04-02 14:07:23 -0500 received badge  Famous Question (source)
2013-04-02 14:07:23 -0500 received badge  Notable Question (source)
2013-04-02 14:07:23 -0500 received badge  Popular Question (source)
2013-03-07 07:53:32 -0500 received badge  Famous Question (source)
2013-02-27 04:21:53 -0500 received badge  Notable Question (source)
2012-12-23 17:40:13 -0500 asked a question Does Arduino "subscribe buffer size" affect wireless connection stability?

Hi,

I'm trying to connect to an Arduino, or a couple of Arduinos via Bluetooth serial, and am wondering if the 'subscribe buffer' size makes a difference in the stability of the bluetooth connection?

[INFO] [WallTime: 1355082105.350746] ROS Serial Python Node
[INFO] [WallTime: 1355082105.364278] Connected on /dev/rfcomm2 at 57600 baud
[INFO] [WallTime: 1355082109.857011] Note: subscribe buffer size is 280 bytes

If so, how do I change this buffer? If not, is there anything that I can do to stabilize the connection a bit more? It seems to miss a lot of packets (which I understand is inherent in wireless), but is there any way to secure a better connection?

2012-12-16 08:48:49 -0500 received badge  Popular Question (source)
2012-12-14 03:05:54 -0500 asked a question Use regular ROS subscriptions on arduino (not rosserial_arduino)

Hi,

I am wondering if there is any way to use 'regular' ROS subscriptions on an arduino, rather than the 'special' rosserial_arduino ones. There are some functions on the regular subscription classes that I want to use that are not available on the arduino ones.

Thanks!

2012-12-13 10:11:26 -0500 received badge  Notable Question (source)
2012-12-13 09:30:45 -0500 commented answer Any way to check if/ensure that ROS node subscribed to topic properly?

I did want to use getNumPublishers(), from the subscription on the arduino side.

However, i'm not so sure if this option is available for the arduino version of the subscriber. If i do the check on the publisher side, i dont see how i can tell the arduino to try to re-subscribe if it fails

2012-12-12 13:08:38 -0500 received badge  Famous Question (source)
2012-12-12 06:41:33 -0500 commented answer Any way to check if/ensure that ROS node subscribed to topic properly?

how does that distinguish the success of each individual subscription? if I use "if(handle{...}", and use nh as my handle, am I to assume that as long as one subscription fails, the if statement will detect this?

2012-12-11 14:39:30 -0500 commented answer Any way to check if/ensure that ROS node subscribed to topic properly?

which part is the 'handle'? I'm not sure what to put in there

2012-12-11 12:03:14 -0500 received badge  Notable Question (source)
2012-12-11 03:28:39 -0500 received badge  Popular Question (source)
2012-12-11 02:56:31 -0500 edited question Any way to check if/ensure that ROS node subscribed to topic properly?

Hey,

So I'm attempting to connect to multiple nodes through rosserial over bluetooth, but the connections are very inconsistent. Each node should subscribe to three topics, but a lot of the time, one or two of these subscriptions fail, and I have to re-try the connection.

It should look something like this, with three subscriptions set up:

[INFO] [WallTime: 1355082105.350746] ROS Serial Python Node
[INFO] [WallTime: 1355082105.364278] Connected on /dev/rfcomm2 at 57600 baud
[INFO] [WallTime: 1355082109.857011] Note: subscribe buffer size is 280 bytes
[INFO] [WallTime: 1355082109.857714] Setup subscriber on PS3_Status_1 [std_msgs/Int32MultiArray]
[INFO] [WallTime: 1355082109.867275] Setup subscriber on redBLANK [std_msgs/Int32MultiArray]
[INFO] [WallTime: 1355082109.883375] Setup subscriber on toArduinoLeadRED [std_msgs/Int32MultiArray]

But will typically look like this, with one or two missing:

[INFO] [WallTime: 1355082105.350746] ROS Serial Python Node
[INFO] [WallTime: 1355082105.364278] Connected on /dev/rfcomm2 at 57600 baud
[INFO] [WallTime: 1355082109.857011] Note: subscribe buffer size is 280 bytes
[INFO] [WallTime: 1355082109.857714] Setup subscriber on PS3_Status_1 [std_msgs/Int32MultiArray]
[INFO] [WallTime: 1355082109.867275] Setup subscriber on redBLANK [std_msgs/Int32MultiArray]
[INFO] [WallTime: 1355082109.883375] Packet Failed :  Failed to read msg data

Is there any way that I can make the node keep attempting to subscribe before running the code? Or is there a better way to make sure all of these subscriptions are properly connected? It's kind of annoying to have to turn everything off and reset everything if the subscription fails.

The nodes are arduinos, and the set up code is standard:

void messageCont( const std_msgs::Int32MultiArray& x);
void AIStates( const std_msgs::Int32MultiArray& x);
void leadUpdate( const std_msgs::Int32MultiArray& x);
.
.
.
char controlSUB[13] = "PS3_Status_1";
char aiSUB[9] = "redWHITE";
char leadSUB[17] = "toArduinoLeadRED";
.
.
.
ros::NodeHandle nh;
ros::Subscriber<std_msgs::Int32MultiArray> subControl(controlSUB, &messageCont );
ros::Subscriber<std_msgs::Int32MultiArray> subAI(aiSUB, &AIStates );
ros::Subscriber<std_msgs::Int32MultiArray> subLeader(leadSUB, &leadUpdate );

void setup(){
.
.
. 
   nh.initNode();
   nh.subscribe(subControl);
   nh.subscribe(subAI);
   nh.subscribe(subLeader);   
}
.
.
.

Thanks!

EDIT: After looking at the link posted by PerkinsJames, I think those are for the 'regular' ros subscriptions, and not the ones that arduino uses.

I think the functions that I need are the ones from rosserial_arduino (someone let me know if I am wrong): http://ftp.isr.ist.utl.pt/pub/roswiki/doc/diamondback/api/rosserial_arduino/html/libraries_2ros__lib_2ros__lib_8cpp_source.html

It would seem that the subscribe function gives a boolean value, but it only affirms that the subscription has been added to the array, and not if it has been connected (Line 105)

bool ros::NodeHandle::subscribe(Subscriber & s)
{
   int i;
   for(i = 0; i < MAX_SUBSCRIBERS; i++)
   {
     if(subscribers[i] == 0) // empty slot
     {
       subscribers[i] = &s;
       s.id_ = i+100;
       s.nh_ = this;
       return true;
     }
   }
   return false;
 }

So the questions now are:

  1. Is there any way to affirm the rosserial_arduino subscriptions are actually connecting? From looking at this file, I can't really see any. There aren't any functions that seem to do that.
  2. Is there a way to use the 'regular', 'non-arduino' subscribers and nodehandles to be able ...
(more)
2012-12-09 08:00:20 -0500 received badge  Organizer (source)