Questions tagged [subscribe]
The subscribe tag has no usage guidance.
120
questions
0
votes
0
answers
21
views
Does rclpy supports intraprocess communication?
I wanted to know if rclpy supports intraprocess communication or is there a way to do intraprocess in rclpy with python based libraries?
Thanks,
0
votes
0
answers
24
views
Subscriber in python to std_msgs.msg.Float32 crashes when the maximum float-32bits is sent
Setup:
a publisher in c++ of std_msgs/msg/Float32 sends the maximum float-32bits (using std::numeric_limits::max())
a subcriber in c++ to the topic above works just fine
a subcriber in python to the ...
0
votes
1
answer
82
views
Subscribe to geometry_msgs/TransformStamped (tf) Message with message_filters ApproximateTime subscriber
I am trying to use a message_filters::sync::ApproximateTime subscriber in a C++ node that must subscribe to 2 custom messages (which have a Header each), nav_msgs/OccupancyGrid Message, and a tf/...
1
vote
1
answer
66
views
Arduino IDE micro-ros two subscriber in Arduino due issue
I’m recently started working with micro-ros and also tested the publisher and subscriber with Arduino Due, but I want to add multi subscriber in my Arduino code (at-least two). but it’s not working ...
0
votes
1
answer
40
views
ROS2/create_subscription: How to pass callback arguments
In ROS 1, I was able to pass arguments to the callback function of a subscriber:
rospy.Subscriber(topic_name, type, call_back, call_back_arg)
How can I do this in ROS2?
My goal is to pass the name of ...
0
votes
1
answer
2
views
Definitions of map and tf using turtlebot3
Hello, I am using turtlebot3 and SLAM.
My environment is Ubuntu 18.04 LTS and ROS1 melodic.
I have the questions about /tf and /map.
I want to implement subscriber callback, but I don't know the type ...
0
votes
1
answer
5
views
What happens when two messages in a topic came one after another?
Let's say I have a node that is subscribed to a topic.
Every time a message comes it will call a callback where it will process the message.
So, a message comes in and the node calls the callback ...
0
votes
1
answer
4
views
Number of TCP connections for a "bidirectional" topic?
Hi all,
I have a (possibly) simple question: assume if I have two nodes A, B that communicate over a topic "/my_topic", i.e., both nodes subscribe and publish to "/my_topic" using ...
0
votes
1
answer
10
views
Can't find package: cartographer_ros
I'm trying to get a marker array containing pose info from cartographer_ros. I got the 2D cartographer_ros demo working, and the Subscribe demo working.
I'm now trying to modify the Subscribe demo to ...
0
votes
1
answer
1
view
[Solved] Error when subscribing to multiple topics in python
Hello,
I'm new to ROS and I'm having a problem when I try to move my turtle to a goal that I'm publishing.
I created a node that subscribes to 2 topics: the position of the turtle and the ...
0
votes
1
answer
1
view
NodeHandle::subscribe fail to subscribe topic
Hi, I'm new to ROS and C++ and doing Programming for Robotics (http://www.rsl.ethz.ch/education-students/lectures/ros.html). My problem is "Create a subscriber to the /scan topic" in ...
0
votes
1
answer
4
views
Subscribe vs. waitForMessage for a 30hz topic
I would like to read a topic (which is published at ~30hz) at specific moments in the execution of my code. This Q&A shows I have 2 ways to proceed:
waitForMessage (from here) which is a "...
0
votes
1
answer
1
view
Subscribing to a topic whenever it publishes without affecting the execution of program
Hello,
I'm writing a project with C++ in ROS indigo installed in Ubuntu.
In my project, I do some processes in one node and publish the result data and in an other node, want to subscribe to this data ...
0
votes
1
answer
8
views
Subscribe to actions on keyboard (press key)
Hi,
I want to receive messages in ROS that tell me which key was pressed on a keyboard that is connected with the PC. I found several examples for other input devices and also some of them treated ...
0
votes
1
answer
2
views
depth_image_proc subscriber
I am trying to use the depth_image_proc node and am unsure how to connect it to my network. I have no experience with a nodelet and cannot seem to remap the topics correctly. Below is my output ...
0
votes
1
answer
2
views
Accessing previous estimated joint states of a robot
Hi,
I am new to ROS and I am trying to implement a Kalman filter for estimating the joints velocity and acceleration of a robotic manipulator.
The angular position of each joint is published to the ...
0
votes
1
answer
4
views
Is it possible to read data from /map?
Hello weveryone, I'm trying to read the data from the topic /map (in ROS Kinetic) but I don't know if I'm subscribing correctly.
I'm using the following code to count the number of gray pixels (...
0
votes
2
answers
2
views
ros_tutorials roscpp talker/listener loses first message or two
This must've been seen before...I ran into it while trying to track down a lost message from a command-line app which publishes one message then exits. I'm running ros kinetic on Ubuntu 16.04.4. My ...
0
votes
1
answer
3
views
Unable to print subscribed sensor_msgs with ROS_INFO
Hello and thanks for reading my post.
I am trying to subscribe to a topic from an imu using the sensor_msgs::MagneticField. This topic is published by a 3rd party package called mavros. I am trying to ...
0
votes
1
answer
21
views
Are ROS2 messages guaranteed to be received by a Subscriber in the same order they were published?
According to https://github.com/ros2/ros2/wiki/About-Quality-of-Service-Settings it's possible to vary the QoS settings of History, Depth, Reliability and Durability. However, I can't find any mention ...
0
votes
1
answer
7
views
Make gazebo subscribe to a ROS topic?
Hi, I've noticed that there are some ros topics that have the gazebo as a subscriber. Can someone tell me how can I make gazebo subscribe to a topic I create or where I can learn about it?
Originally ...
0
votes
1
answer
3
views
Rospy callback attribute error
Am following a youtube tutorial (https://www.youtube.com/watch?v=DLVyc9hOvk8) with my own code:
Executable:
...
0
votes
1
answer
2
views
Subscribe Message file
Hello!
I want to subscribe data from .msg file. However the file has four other msgs inside. The format of the .msg file is:
...
0
votes
1
answer
1
view
writing a publisher and subscriber and unsure how to finish it
I am taking this edx course on robotics using ROS and our first project is "writing a node that subscribes to a topic and publishes to another. Your code will subscribe to a topic called '...
0
votes
1
answer
13
views
Subscribing to /rosout topic
Is there a way I can write a node to subscribe the log messages from the /rosout topic and save in a HTML file?
Originally posted by robo_ninja on ROS Answers with karma: 55 on 2017-07-18
Post score: ...
0
votes
1
answer
1
view
The question about ros::publisher and ros::subscriber
I want to achieve receiving and transform data using rostopic at the same time or in a low time. I know that ros::subscriber can subscribe rostopic and receive the data included in topic. So I hope ...
0
votes
1
answer
1
view
One time publish executable
Hi,
Im trying to use a specific node (program A) as a test program being executed once taking the value to be published on a topic (lets call it "foo").
Program B is already subscribed to ...
0
votes
1
answer
1
view
what if computation complexity cannot meet the demand of callback frequency
According to the totorials, the callback function frequency is dependent on the its subscribing topic frequency.
What will happen if the callback function is very complex and the computation time is ...
0
votes
1
answer
3
views
Interrupting a topic callback to call a service
I am currently facing an issue with my code, which both subcribes to a topic, and runs the server side of a service.
The problem i am currently facind is that the topic which i am subscribing to is ...
0
votes
1
answer
4
views
subsribe to two integer type msgs with one call back function
I tried to subscribe to two integer types .But lot of errors are showing .Please help me to correct the code
code:
...
0
votes
1
answer
2
views
subscribe to two topics of int and sensormsg types
I want to subscribe to topics that are of types int and sensor_msg .I want only one call back function to proces these two messages together .Please give an example code for this:
Originally posted ...
0
votes
2
answers
8
views
How do Publisher/Subscriber Message Queues Work?
Hi all,
I can't seem to find any documentation on this, but it I want to understand more deeply how messaging queues work.
My understanding is that each node has its own publisher and subscriber ...
0
votes
1
answer
1
view
Is it possible to publish/subscribe as root?
Hello smart people,
I have made a ROS node that makes use of an FTDI library that requires that I run the executable as root to have access to the usb device that the node reads data from. The trouble ...
0
votes
2
answers
2
views
Template argument deduction fails
Hi,
I have this call for a Subscriber:
ros::Subscriber sub = handle.subscribe<std_msgs::Bool>(topic_str.str(), 10, boost::bind(obIcCb, _1, i));
Why do I need ...
0
votes
1
answer
1
view
An alternative to data processing inside callback functions?
I want to perform calculations on the data from my subscriptions the instant it arrives.
I could of course just do this inside the callback function, but i would insted like to perform these ...
0
votes
1
answer
1
view
In general: How to catch subscription errors?
How do i catch errors from subscribers, or even better in general. Originally I tried to catch only subscription errors but as I moved on how to do catch ros exceptions in general as its done in c++ ...
0
votes
1
answer
1
view
Node that Subscribes then Publishes to another node
Hey guys,
I am working on a project that requires me to subscribe to a node, make sure it is within a certain bounds then publish it to another. It subscribes and reads the information correctly ...
0
votes
1
answer
3
views
eclipse and catkin_make not linking to ros.h dependencies
Hello all,
So I am working on a project where I basically want to create a node to take information from another, check it, then publish that information elsewhere. I was working on it yesterday and ...
0
votes
1
answer
15
views
How do i publish in a callback function?
Good evening,
my problem is that i want to subscribe and publish in the same node. I need to publish in a callback function but the nodehandle is initialized in the ...
0
votes
1
answer
7
views
How to subscribe to a topic, while publishing to another
Hey guys,
I want to write a basic controller for a quadrotor.
For a target_position it should take the current_position from a simulated quadrotor, calculate an error between the two and send the ...
0
votes
1
answer
3
views
Listening to Publisher in Python from C++ Subscriber: Problem
Hello all,
I have a publisher in Python that I want publishing an Integer value from 0-2. I want to subscribe to that publisher from C++ and obtain that value. Below is the relevant code:
PYTHON:
<...
0
votes
1
answer
9
views
Python - Compressed Image, Publisher/Subscriber
I have implemented the code provided in:
http://wiki.ros.org/rospy_tutorials/Tutorials/WritingImagePublisherSubscriber
however the published topic is empty. It does not contain any information. I ...
0
votes
1
answer
1
view
Publish to topic from file
Hello,
I am quite new to ROS. I have a logfile (format: .pcapng) and I want to write a node which receives the logged udp-packets (as a simulation; later, the node should receive these packets from a ...
0
votes
1
answer
2
views
Subscribe to multiple topics simultaneously
Hi,
I implement a stair detection algorithmus for ROS. Therefore the node analyzes input data from an Asus Xtion camera via openni_launch. Can the node subscribe to both topics, /camera/depth/image ...
0
votes
1
answer
2
views
Is it necessary to using Callback function when I subscribe?
Hi guys!
I'm begginer studying ros at this moment.
When I do tutorials that make talker and listener (Publisher & Subscriber), I really wonder weather it is necessary to using callback function in ...
0
votes
1
answer
1
view
subscribe to arduino message
Hello all,
My arduino send geometry twist message about robot path on /robotpath topic, when i type rostopic echo /robotpath i ...
0
votes
2
answers
19
views
How can I subscribers multiple topics to get data at the same time (python)?
Hi,
Am new to ROS and I need a little help. There are 4 topics (robot0/sonar1, robot0/sonar2, ...) of same type (sensor_msgs/Range). I need to process these 4 values together.
...
0
votes
1
answer
1
view
Subscriber topic field
Hi, to optimize cpu cost, I would like subscribe to a field of topic. Although it is not the exact case, the problem is subscribe to topic type sensor_msgs Temperature containing a header field. It is ...
0
votes
1
answer
4
views
How c++ subscribes float64 message published from rosserial
Hi, I want to subscribe some data which is published from rosserial_arduino in cpp
I coded like this in sketch
...
0
votes
1
answer
4
views
My node of ROS keeps dying. Subscribe a gazebo topic and publish in a ros topic
Hi,
I have created a node in ROS so I can subscribe a topic of gazebo, analyse the information and then use it.
I have a callback function for the subscription and I put the information in a certain ...