Cannot send messages to the robot

asked 2022-07-25 12:58:06 -0500

Pouya_Jigsaw gravatar image

Hi guys,

I cannot send messages from a node in a PC, to a ROS master robot.

I want to send control commands from a PC to a robot. For example, I write this command:

rostopic pub /cmd_vel geometry_msgs/Twist "linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 1.0" -r 1

The Robot does not rotate along the Z axis. If i write this command in the robot linux terminal, it will work without a problem. If i use "rostopic info /cmd_vel" in the robot I can see that a publisher with the PC ip address exists. The PC can receive messages from the robot. Even if i create a new topic from PC the Robot recognizes that, but if i publish a messages from PC to the topic the messages won't be echoed when I write this in the robot terminal: "rostopic echo /topic"

I did all the possible ways to tackle this issue. both systems will ping each other, I even checked the network with netcat, and different ports. I put the hostname and the IP Address in the "/etc/hosts" in both system. I specified ip with ROS_IP as well. I disabled firewall on both systems to see if that works. I even reinstalled ROS on the system.

The Robot's OS is Ubuntu 18.04 (with ROS Melodic) and the PC is 20.04 (with ROS Noetic). I use the Jackal Robot from clearpath

edit retag flag offensive close merge delete

Comments

1

Hi I got the same problem as you. I'm trying to connect a Ubuntu 20.04 PC with noetic and a Raspberry Pi 4 @ Ubuntu 20.04 also with noetic. I'm running roscore on the Pi and I set the ROS_MASTER_URI on both to the ip adress of my pi.

Veridict is the same as you: I can listen from my PC what the Pi publishes but not the otherway around.

Setting ROS_IP and ROS_HOSTNAME doesn't help either. My Firewall settings for ufw and iptables are also at default values. Also tried it on other machines on another network.

I'm just using the beginner tutorials talker.py and listener.py. If I run roswtf while listener.py runs on the pi and talkery.py runs on my pc at the same time i get this error:

...
WARNING No tf messages

Found 1 error(s).

ERROR The ...
(more)
N4b0 gravatar image N4b0  ( 2022-07-28 07:27:46 -0500 )edit

Still no solution?

Pouya_Jigsaw gravatar image Pouya_Jigsaw  ( 2023-04-11 08:16:36 -0500 )edit