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

is it possible to have 2 rosnode handles in rosserial ?

asked 2022-02-11 07:35:46 -0500

Shiva_uchiha gravatar image

HI I am trying to implement a PILS with gazebo by using rosserial to link MCU to PC . My MCU runs freeRTOS . I want to create 2 node handles one for subscriber and other for publisher each nh will be called in 2 separate tasks respectively.

When I tried this either subscriber or publisher is getting connected not both.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-02-11 16:56:21 -0500

miura gravatar image

Probably one of them is terminated because it is running rosserial with the same name.

For example, let's say you are doing the following

$ rosrun rosserial_python _port:=/dev/ttyUSB1
$ rosrun rosserial_python _port:=/dev/ttyUSB2

In that case

$ rosrun rosserial_python _port:=/dev/ttyUSB0 __name:=usb0_node
$ rosrun rosserial_python _port:=/dev/ttyUSB0 __name:=usb1_node

I think the solution is to name it as.


edit flag offensive delete link more

Question Tools



Asked: 2022-02-11 07:35:46 -0500

Seen: 51 times

Last updated: Feb 11 '22