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

thinwybk's profile - activity

2023-11-29 18:08:49 -0500 received badge  Famous Question (source)
2022-03-24 04:25:08 -0500 received badge  Famous Question (source)
2022-03-23 07:44:30 -0500 received badge  Good Answer (source)
2022-03-04 11:29:42 -0500 received badge  Famous Question (source)
2021-08-05 03:02:20 -0500 received badge  Famous Question (source)
2021-07-08 12:11:10 -0500 received badge  Notable Question (source)
2021-07-08 12:11:10 -0500 received badge  Famous Question (source)
2021-06-30 10:17:11 -0500 received badge  Famous Question (source)
2021-06-29 10:50:22 -0500 received badge  Nice Question (source)
2021-03-29 10:12:04 -0500 marked best answer How can I retrieve a list of process IDs of ROS nodes?

I would like to get the process ID of ROS nodes (preferably by ROS node name). Are there any limitations when getting the pid by ROS node name? Are there any generic patterns which I can refer to?

I thought about "grepping" for "ros" in the ps listed processes:

ps ax | grep ros

17963 pts/1    Sl+    0:00 /usr/bin/python /opt/ros/indigo/bin/roscore
17975 ?        Ssl    0:00 /usr/bin/python /opt/ros/indigo/bin/rosmaster --core -p 11311 -w 3 __log:=/home/kromer/.ros/log/9db6e284-a466-11e7-b8cd-28f10e310550/master.log
17988 ?        Ssl    0:00 /opt/ros/indigo/lib/rosout/rosout __name:=rosout __log:=/home/kromer/.ros/log/9db6e284-a466-11e7-b8cd-28f10e310550/rosout-1.log
18007 pts/16   S+     0:00 grep --color=auto ros

... or using pgrep to get the pid by ROS node name:

pgrep roscore
17963

pgrep rosmaster
17975

pgrep rosout
17988

(top and htop seemed not suitable.)

2021-02-09 02:33:24 -0500 received badge  Nice Question (source)
2021-01-29 12:28:15 -0500 marked best answer How are several test cases in a ROS test node executed?

If a ROS test node (like hztest) does contain more than one test case how are they executed then? (Each with or without a new execution environment? What execution order?)

2021-01-11 08:27:07 -0500 received badge  Famous Question (source)
2020-12-09 02:44:51 -0500 received badge  Notable Question (source)
2020-12-05 00:08:07 -0500 received badge  Popular Question (source)
2020-12-04 09:37:59 -0500 asked a question How to connect ROS2 to a MQTT broker?

How to connect ROS2 to a MQTT broker? Is there something like ROS1 mqtt_bridge for ROS2?

2020-12-04 09:36:22 -0500 marked best answer ROS package template for Python package generation

Are there any project templates for ROS Python packages which can be used with a project generator like cookiecutter?

2020-11-17 13:27:46 -0500 received badge  Notable Question (source)
2020-10-04 00:27:30 -0500 received badge  Famous Question (source)
2020-08-10 02:58:01 -0500 received badge  Notable Question (source)
2020-04-26 23:23:58 -0500 received badge  Famous Question (source)
2020-04-11 18:24:07 -0500 received badge  Popular Question (source)
2020-04-11 04:45:57 -0500 asked a question ROS2 integration into end-to-end machine learning platforms?

ROS2 integration into end-to-end machine learning platforms? Are there any integrations of ROS2 into end-to-end machine

2020-03-20 06:55:15 -0500 received badge  Famous Question (source)
2020-03-17 08:24:22 -0500 received badge  Famous Question (source)
2020-03-17 08:24:22 -0500 received badge  Notable Question (source)
2020-03-17 01:51:26 -0500 received badge  Nice Answer (source)
2020-02-06 09:48:43 -0500 marked best answer Ubuntu 16.04 deb packages for ROS2 Bouncy Bolson?

Right now there are no deb packages for Ubuntu 16.04 (Xenial) (ros2 wiki ROS2 Bouncy Bolson Release Notes). Will there be some in the future?

2020-01-15 13:12:22 -0500 received badge  Popular Question (source)
2020-01-15 13:12:22 -0500 received badge  Notable Question (source)
2019-10-14 23:42:21 -0500 received badge  Famous Question (source)
2019-10-09 19:38:44 -0500 received badge  Nice Question (source)
2019-09-23 17:04:11 -0500 received badge  Famous Question (source)
2019-09-06 03:41:29 -0500 received badge  Popular Question (source)
2019-09-06 03:41:29 -0500 received badge  Notable Question (source)
2019-09-06 03:41:29 -0500 received badge  Famous Question (source)
2019-08-09 17:03:05 -0500 marked best answer rospy.ServiceProxy master port mismatch

On my dev machine I run ros master on default port 11311 via ROSLaunchParent as follows:

os.environ["ROS_IP"] = "<dev-machine-ip>"
os.environ["ROS_MASTER_URI"] = "http://<dev-machine-ip>:11311"
roslaunch = ROSLaunchParent('', [], is_core=True, port=11311)
roslaunch.start()

stdout states that the roslaunch server is running on port 43121 (changes randomly between starts of roslaunch):

started roslaunch server http://<dev-machine-ip>:43121/

The master seems to be started on port 11311:

auto-starting new master
process[master]: started with pid [15304]
ROS_MASTER_URI=http://<dev-machine-ip>:11311/

I use docker-py (dc is a client, di is an images instance, dn is a network) to run a ROS node <some-node> in a docker container which connects to the dev machines master.

dn = dc.networks.create(name='some_test', driver="bridge")
some_node = dc.containers.run(image=di[0].id, environment=["ROS_IP=<some-ip-in-the-dev-machine-subnet>", "ROS_MASTER_URI=http://<dev-machine-ip>:11311"], name='<some-node>', network='test', command=rosrun_command, detach=True, tty=True)

import rosnode; nodes = rosnode.get_node_names(); print(nodes) lists /<some-node> (and /rosout). some-node is (at least) discoverable in the network. So far so good.

If I send multiple service requests with

rc_itempick_start = rospy.ServiceProxy('/<some-node-namespace>/<some-service>', <service-type>)
rc_itempick_start()

a random port is used instead of 11311:

core.py    WARNING  Unknown error initiating TCP/IP socket to <some-ip-in-the-dev-machine-subnet>:35516 (rosrpc://<some-ip-in-the-dev-machine-subnet>:35516)
(...)
error: [Errno 113] No route to host
core.py    WARNING  Unknown error initiating TCP/IP socket to <some-ip-in-the-dev-machine-subnet>:60739 (rosrpc://<some-ip-in-the-dev-machine-subnet>:60739)
(...)
error: [Errno 113] No route to host
(etc.)

Can someone help out in cross-checking what I missed?

2019-07-28 12:42:08 -0500 received badge  Popular Question (source)
2019-07-28 12:42:08 -0500 received badge  Notable Question (source)
2019-07-26 04:12:10 -0500 received badge  Famous Question (source)
2019-07-23 08:49:33 -0500 received badge  Necromancer (source)
2019-07-18 13:51:33 -0500 marked best answer Minimal ROS2 Python package

How looks the structure and the content of a plain ROS2 library level package? The intent of the package is to encapsulate functionality implemented in Python which can be imported into other ROS2 packages.

  • no ROS2 dependency (despite for building, linting, etc.)
  • no scripts
  • no nodes
  • no docs
  • no tests just plain ament linter checks (copyright, flake8, pep257)

EDIT: Draft on GitHub.

2019-07-18 09:16:23 -0500 marked best answer What default ports are used in ROS2 DDS implementations?

Its seems like the default ports for DDS communication are not specified. What deafult ports do the different DDS stacks use?

2019-05-31 11:05:56 -0500 received badge  Famous Question (source)
2019-05-20 01:57:15 -0500 marked best answer How can I integrate Python rosunit unit tests into the cmake build?

I would like to run rosunit Python unit tests as part of make test in the CI environment. In the wiki and in the catkin docs it is recommended to use cmake_add_nodetest() for that. Is cmake_add_nosetest() specific to nosetest or can it used with the plain unittest test runner as well/instead? (I know that rosunit depends on unittest. I didn't recognize a dependency from nosetest.) If it's possible: Could you guide me to an integration example in the ROS code base?

2019-05-20 01:57:07 -0500 marked best answer How can I find ROS packages on GitHub?

How can I find ROS packages on GitHub? I thought about e.g. using the GitHub search field with something like <package> filename:package extension:xml to search for package.xml files which contain <package> (GitHub syntax for searching code). But I did not come up with a suitable serach pattern so far.

2019-05-20 01:55:10 -0500 received badge  Famous Question (source)
2019-05-17 01:37:01 -0500 received badge  Notable Question (source)