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

highWaters's profile - activity

2021-11-24 07:57:05 -0500 received badge  Nice Answer (source)
2021-10-07 14:59:47 -0500 received badge  Self-Learner (source)
2021-06-25 09:42:32 -0500 received badge  Self-Learner (source)
2020-08-31 02:51:50 -0500 marked best answer Profiling python code with valgrind produces empty log file

Hi all,

I am running 12 ROS nodes (ROS kinetic) and starting the system with a roslaunch file. I would like to profile one of the nodes, while the whol system is running. From my search it seems that I can use valgrind.

I set the roslaunch file as below (as shown here):

<launch>
<param name="use_sim_time" value="true"/>
<arg name="seedval"/>
<param name="seed" value="$(arg seedval)"/>

<group ns="robot1">
<node pkg="pkg_name" name="agent" type="agent.py" launch-prefix="valgrind --tool=callgrind --separate-threads=yes --callgrind-out-file='callgrind.sim1.%p'">
<param name="myID" value="1"/>
......
</node>
</group>

.....
</launch>

I build the package in debug mode like so:

catkin_make -DCMAKE_BUILD_TYPE=Debug

Now from what I have read, valgrind will dump the data when the program terminates. And the issue might lie here, because the nodes exit with sys.exit(), raising a SystemExit exception. I have tried adding the --dump-before=function option, but to no avail:

launch-prefix="valgrind --tool=callgrind --dump-before=name_of_function_as_in_script --separate-threads=yes --callgrind-out-file='callgrind.sim1.%p'"

Any ideas, I am not quite sure how to proceed.

Thanks!

hW

2020-07-08 01:34:08 -0500 received badge  Famous Question (source)
2020-06-10 09:54:39 -0500 received badge  Notable Question (source)
2020-04-07 00:43:48 -0500 received badge  Popular Question (source)
2020-03-27 04:18:55 -0500 commented question Profiling python code with valgrind produces empty log file

Ok, I had an epiphany and did the following: launch-prefix="pprofile --format callgrind --out out". I will marked this a

2020-03-27 04:14:44 -0500 commented question Profiling python code with valgrind produces empty log file

Hi, I get the file, but it is empty. From here it seems I might have to do compile python itself in debug mode, such tha

2020-03-27 03:53:25 -0500 edited question Profiling python code with valgrind produces empty log file

Profiling python code with valgrind produces empty log file Hi all, I am running 12 ROS nodes (ROS kinetic) and startin

2020-03-26 16:24:18 -0500 asked a question Profiling python code with valgrind produces empty log file

Profiling python code with valgrind produces empty log file Hi all, I am running 12 ROS nodes and starting the system w

2019-12-13 00:27:26 -0500 received badge  Popular Question (source)
2019-12-13 00:27:26 -0500 received badge  Notable Question (source)
2019-12-13 00:27:26 -0500 received badge  Famous Question (source)
2019-10-08 09:58:43 -0500 received badge  Nice Question (source)
2019-10-02 10:32:01 -0500 received badge  Famous Question (source)
2019-09-20 02:41:21 -0500 marked best answer Ros running on 2 machines, one master, subscriber not getting any message

Hello,

I have the following configuration with two machines running on Ubuntu: On one machine I run the ros master, and a listener (tutorial one)

On the other I have a talker (again from the tutorial). I set the ROS_MASTER_URI as specified in http://wiki.ros.org/ROS/Tutorials/Mul... . I am able to ping between the machines, and use netcat to send msgs back and forth from the command lines. I have allowed port 11311 with ufw.

If I run the talker, the listener doesn't get any message. If I run rqt_graph it shows the nodes and the topic on which they publish/subscribe. The listener node's color is in red, and nothing changes if I hover on it.

Any idea for what could be the issue?

2019-01-24 12:19:32 -0500 received badge  Notable Question (source)
2019-01-24 11:27:56 -0500 asked a question Node not receiving update after simulated time is update on /clock topic.

Node not receiving update after simulated time is update on /clock topic. Hello, I am playing a bit with simulated time

2019-01-24 11:27:34 -0500 asked a question Node not receiving update after simulated time is update on /clock topic.

Node not receiving update after simulated time is update on /clock topic. Hello, I am playing a bit with simulated time

2018-06-05 03:58:56 -0500 received badge  Good Answer (source)
2018-06-05 03:58:56 -0500 received badge  Enlightened (source)
2018-03-20 11:53:34 -0500 received badge  Famous Question (source)
2018-02-16 16:08:36 -0500 received badge  Popular Question (source)
2018-02-13 11:12:49 -0500 received badge  Famous Question (source)
2018-01-26 11:47:08 -0500 received badge  Notable Question (source)
2018-01-26 11:47:08 -0500 received badge  Famous Question (source)
2018-01-17 03:47:04 -0500 received badge  Famous Question (source)
2018-01-17 03:47:04 -0500 received badge  Notable Question (source)
2017-11-30 07:08:01 -0500 received badge  Notable Question (source)
2017-11-09 00:00:44 -0500 received badge  Popular Question (source)
2017-10-29 07:22:45 -0500 marked best answer How to queue goals with actionlib

Hello,

As I have understood, with the simple action server, when a new goal comes in, it preempts old ones. From this post http://answers.ros.org/question/9776/... it seems that it is possible to put such goals into queues, however it is not clear to me how. Is there any tutorial, or anything providing a guideline for how to implement this?

Thank you for your time:)

2017-10-29 07:22:45 -0500 received badge  Nice Answer (source)
2017-10-28 08:20:44 -0500 asked a question Is a rospy subscriber callback queue processed serially?

Is a rospy subscriber callback queue processed serially? Hello, From https://answers.ros.org/question/9543/rospy-thread

2017-10-02 20:21:13 -0500 marked best answer Error when deserializing message, buffer overrun, publisher in labview, subscriber in ubuntu machine.

Hello,

I have the following setup. There are two machines, one arm device with Ubuntu in which I run the ros master and a subscriber, and one labview system which connects to that master and runs a publisher. The subscriber and publisher node are the basic ones from the ros tutorials.

When publishing, I get the following error on the subscriber's side:

[ERROR] []: Exception thrown when deserializing message of length [] from []: Buffer Overrun

if I have sent an empty message (empty string) or

[ERROR] []: Exception thrown when deserializing message of length [] from []: basic_string::_S_create

in case it is not empty.

I was able to find one related post here: #q42336. As I understand it might be an endianness problem and in fact the arm device is little endian while the other is big endian.

I think that the problem lies on the publisher's side, in which the length of the ros message is written big endian, as such a crash is produced on the subscriber which reads it little endian. How can this be solved?

Thank you for your time.

2017-10-02 20:20:48 -0500 received badge  Famous Question (source)
2017-09-28 13:14:22 -0500 received badge  Famous Question (source)
2017-05-25 18:43:00 -0500 received badge  Famous Question (source)
2017-03-26 02:33:21 -0500 received badge  Notable Question (source)
2017-03-16 06:55:19 -0500 marked best answer How to update a gui (python) each time the callback function is called in a subscriber node?

Hello,

I want to have several nodes send their position (x,y) to a 'visualizer' node which draws on some window/gui continuously as more data is published by the former nodes.

What I have so far (considering 1 publisher node and 1 visualizer node):

import sys
import rospy
from GITagent.msg import Position
from PyQt4.QtGui import *
from PyQt4.QtCore import *

app = QApplication(sys.argv)
w = QWidget()

def callback(data):
    rospy.loginfo(rospy.get_caller_id() + "I heard %d, %d", data.x_pos, data.y_pos)
    qp = QtGui.QPainter()
    qp.begin()
    drawPoint(data.x_pos, data.y_pos, qp)
    qp.end()

def draw_xypoints(xp, yp, qp):
    qp.setPen(QtCore.Qt.red)
    qp.drawPoint(xp, yp)    

def visualizer():
    rospy.init_node('visualizer', anonymous=True)

    rospy.Subscriber('mypos_xytheta', Position, callback)

    rospy.spin()

if __name__ == '__main__':
    w.resize(320,240)
    w.setWindowTitle("1-2-3 Test")
    w.show()
    sys.exit(app.exec_())
    visualizer()

When I run, the window pops up, but nothing else happens. Also I there is no feedback from the rospy.loginfo(). Apparently I am missing something here. (Obviously, I am not either a python or ros expert, just know some basic stuff). Any help is appreciated:).

2017-02-22 03:46:26 -0500 answered a question Error when deserializing message, buffer overrun, publisher in labview, subscriber in ubuntu machine.

So, the following worked for me. First download the github version of the ros for LabVIEW, as it is the latest one. Then open a new vi and drag a publisher from Examples/Rosexamples folder on the vi. While the master is running on the ubuntu machine, run the vi. It will ask to provide the master's URI. You should then be able to see the messages on the ubuntu side.

For the subscriber on the labview it is the same procedure. You drag it into a new vi, run the vi, it will open up a window where the message should be shown, press run again. The publisher on the ubuntu should be running first.

Hope this helps!