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

Matthew Kleinsmith's profile - activity

2017-08-03 12:40:44 -0500 received badge  Famous Question (source)
2016-11-16 07:06:24 -0500 received badge  Notable Question (source)
2016-11-16 02:56:43 -0500 received badge  Editor (source)
2016-11-16 02:55:14 -0500 answered a question How to install rosserial for Arduino on ROS-Kinetic?
sudo apt-get update
sudo apt-get install -y \
                arduino \
                ros-kinetic-rosserial-arduino \
                ros-kinetic-rosserial
cd ~/sketchbook/libraries
mv ros_lib ~/ros_lib_backup
rosrun rosserial_arduino make_libraries.py ~/sketchbook/libraries

make_libraries.py might raise an error about tf. The error hasn't affected my applications.

The above script is from the official instructions but with "indigo" replaced with "kinetic".

I've only done this with Ubuntu 16.04.

2016-11-16 00:22:39 -0500 received badge  Popular Question (source)
2016-11-15 03:35:39 -0500 received badge  Organizer (source)
2016-11-15 02:37:51 -0500 asked a question rosserial: How do I make a subscriber read the newest message of a topic?

How do I make a rosserial_arduino-based subscriber read the newest message of a topic? (Edit: By "newest message" I mean the message that was published most recently.)

I tried to set the queue size of the subscriber to 1, but I couldn't find the string "queue" in the ros_lib Arduino files; and so I believe it's not a feature of rosserial_arduino.

Here's an example of a rosserial_arduino subscriber from a rosserial_arduino tutorial:

ros::Subscriber<std_msgs::Empty> sub("toggle_led", &messageCb );

void setup()
{
  pinMode(13, OUTPUT);
  nh.initNode();
  nh.subscribe(sub);
}