Ask Your Question

Andy West's profile - activity

2021-04-06 12:15:43 -0600 received badge  Nice Answer (source)
2020-09-21 03:29:35 -0600 answered a question Enable/disable obstacle avoidance during operation

Hi tbondar, If you are using move_base with costmap_2d, the layers of the costmap can be enabled/disabled using the dyn

2020-08-22 09:22:56 -0600 commented answer Rosserial arduino - wrong checksum and mismatched protocol errors

Yay! Glad to be of help.

2020-08-16 08:43:20 -0600 answered a question Rosserial arduino - wrong checksum and mismatched protocol errors

The delay is most likely causing the system to foul up. ROSSerial tries to communicate with the arduino every so often,

2019-01-28 17:45:57 -0600 received badge  Famous Question (source)
2018-11-27 03:39:11 -0600 commented question Stop clearing recovery behaviour on some costmap layers

Hi David, thanks for taking a look. After more investigation, I think it is an issue with the resizeMap function, rathe

2018-11-26 11:37:05 -0600 received badge  Notable Question (source)
2018-11-22 03:04:36 -0600 answered a question transformation from map to laser

If there is no link between base_link and Laser in the TF tree, then you need to publish your own static transform using

2018-11-22 02:57:40 -0600 received badge  Enthusiast
2018-11-21 03:16:19 -0600 answered a question Rosserial baudrate arduino zero

The baud rate default is defined in rosserial_python/serial_node.py. baud = int(rospy.get_param('~baud','57600')) As

2018-11-21 02:48:02 -0600 commented question transformation from map to laser

Try rosrun tf view_frames which will produce a graph showing the connections between the TF frames. Use evince frames.p

2018-11-21 02:47:39 -0600 commented question transformation from map to laser

Try rosrun tf view_frames which will produce a graph showing the connections between the TF frames. Use evince frame.pd

2018-11-20 17:23:05 -0600 received badge  Popular Question (source)
2018-11-20 12:21:49 -0600 commented question Costmap2D: Observation layer's laser scan callback is never called with a low publication rate

It may not be any help, but have you tried having the topics as "scan" rather than "/scan"? In your common params you d

2018-11-20 12:08:09 -0600 edited question Stop clearing recovery behaviour on some costmap layers

Stop clearing recovery behaviour on some costmap layers Hi, I am using move_base with a gazebo simulation of a Turtlebo

2018-11-20 06:19:04 -0600 edited question Stop clearing recovery behaviour on some costmap layers

Stop clearing recovery behaviour on some costmap layers Hi, I am using move_base with a gazebo simulation of a Turtlebo

2018-11-20 06:18:03 -0600 edited question Stop clearing recovery behaviour on some costmap layers

Stop clearing recovery behaviour on some costmap layers Hi, I am using move_base with a gazebo simulation of a Turtlebo

2018-11-20 06:17:58 -0600 edited question Stop clearing recovery behaviour on some costmap layers

Stop clearing recovery behaviour on some costmap layers Hi, I am using move_base with a gazebo simulation of a Turtlebo

2018-11-20 06:12:18 -0600 asked a question Stop clearing recovery behaviour on some costmap layers

Stop clearing recovery behaviour on some costmap layers Hi, I am using move_base with a gazebo simulation of a Turtlebo

2018-07-25 16:33:13 -0600 marked best answer Multiple TCP connections using rosserial_server with WiFi Arduino

Dear all,

I am currently running an Arduino Uno* with an ATWINC1500 WiFi breakout from Adafruit and can successfully publish topics over WiFi to a master using rosrun rosserial_python serial_node.py tcp. This has been achieved using code modified from this previous ROS answer supplied by @ahendrix.

The trouble I run into is running two of these devices at the same time. They both have unique IP addresses and are connected to the network, running differently named topics, and individually can be successfully connected and publish topics.

The first device can be connected using rosrun rosserial_python serial_node.py tcp. Simply starting a second device does not lead to be being connected. If I run a second serial_node.py with a different node name to avoid conflicts (by using rosrun rosserial_python serial_node.py tcp __name:=OtherNodeName), I get an error "socket.error: [Errno 98] Address already in use".

As the socket can't be given as an argument to serial_node.py, I tried using rosrun rosserial_server socket_node as rosserial_server in theory can handle multiple connections. Using default port 11411, I find the node displays:

Listening for rosserial TCP connection on port 11411 but never finds any devices, unlike rosserial_python serial_node.py which was successful.

Am I missing something for rosserial_server to be able to identify and connect to these devices?

Is there another way of connecting multiple TCP devices such as these arduinos with wifi simultaneously?

Thank you for your time,

Andy


UPDATE:

Having followed some very good advice from gvdhoorn, I investigated the packet traffic using Wireshark. Turns out for rosserial_server socket_node the connection between the arduino and the master must not complete (there are a few messages back and forth, but finishes before the "normal" regular published traffic commences as seen when using rosserial_python serial_node.py tcp).

By adding a short delay after nh.advertise(), the master and the arduino are able to make a connection (though socket_node reports some errors to begin with), and start publishing. This also allows for multiple arduinos to be connected! However, the connection then drops out after a minute or so from what I observe as TCP out-of-order issues.

I thought this might be because of the delay(1000) in the main loop, so I replaced this instead for using millis() and letting nh.spinonce() not get held up. This didn't improve the situation, it in fact might have made the drop out occur earlier, but I haven't done any actual timings to confirm that.

There are occurrences of TCP out-of-order when using serial_node.py, but they seem to resolve themselves very quickly and not terminate the connection between the arduino and the master when using identical code. I left this running for a few hours with no termination of connection.

Better questions:

What is it about socket_node that leads to traffic being treated differently compared to serial_node.py and lead to the connection being terminated?

What could be done to improve the stability of TCP connections when using rosserial_server socket_node ... (more)

2018-05-05 14:02:33 -0600 received badge  Nice Question (source)
2017-11-05 14:34:17 -0600 commented answer Multiple TCP connections using rosserial_server with WiFi Arduino

That's a useful tip! Never though of setting separate ports to allow for separate nodes when using rosserial_server. T

2017-11-05 14:00:21 -0600 received badge  Famous Question (source)
2017-10-31 08:57:32 -0600 received badge  Self-Learner (source)
2017-10-31 08:57:32 -0600 received badge  Teacher (source)
2017-10-31 08:56:25 -0600 answered a question Multiple TCP connections using rosserial_server with WiFi Arduino

The result of this investigation is that it may have been an intermittent bug. Having reinstalled rosserial_server just

2017-10-26 15:16:40 -0600 received badge  Notable Question (source)
2017-10-26 14:32:56 -0600 received badge  Student (source)
2017-10-26 14:30:31 -0600 received badge  Editor (source)
2017-10-26 14:30:31 -0600 edited question Multiple TCP connections using rosserial_server with WiFi Arduino

Multiple TCP connections using rosserial_server with WiFi Arduino Dear all, I am currently running an Arduino Uno* with

2017-10-26 14:28:10 -0600 edited question Multiple TCP connections using rosserial_server with WiFi Arduino

Multiple TCP connections using rosserial_server with WiFi Arduino Dear all, I am currently running an Arduino Uno* with

2017-10-26 09:23:57 -0600 received badge  Popular Question (source)
2017-10-26 08:53:04 -0600 commented question Multiple TCP connections using rosserial_server with WiFi Arduino

I've investigated using Wireshark. For rosserial_python serial_node.py it appears to run nicely, however for rosserial_

2017-10-26 05:05:53 -0600 asked a question Multiple TCP connections using rosserial_server with WiFi Arduino

Multiple TCP connections using rosserial_server with WiFi Arduino Dear all, I am currently running an Arduino Uno* with