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

ROS Multiple machines /Slave setup joy control,

asked 2019-08-11 14:48:42 -0500

fyi gravatar image

I am trying to control my robot slave from my master machine using the joy node and ackerman_cmd.. this works fine when I run rescore solely on my slave(no multiple machines) and use the keyboard as input.

Trying to replicate this when i have the master and slave setup seems to not work. i can see the /joy and ackermann_cmd topic on my slave but no control.. doing rostopic echo /ackermann_cmd shows no messages.. although i can see the messages on my master.. Any ideas as to why would be appreciated. Thanks

edit retag flag offensive close merge delete

Comments

Are you sure to have set ROS_MASTER_URI and ROS_IP on both machines?

krl101 gravatar image krl101  ( 2019-08-12 04:16:19 -0500 )edit

I believe so i can see my lidar data from my slave robot and other data on rviz on my master but i cannot send ackermann commands to the my slave

so to elaborate i can see data from the slave i.e my sensors, map, imu on my master but cannot receive ackermann commands sent from my master to the slave. my view was communication was bidirectional . i can see the topics showing on my slave but no information coming in

fyi gravatar image fyi  ( 2019-08-12 05:07:18 -0500 )edit

Communication is bidirectional, with source/sink aka. Publisher/Subscriber in depth. Apart from ROS_MASTER_URI (the same) and ROS_IP (respective IP/hostname) for each machine, is a node not online or has special parameters that do not apply? Can you double check rosnode list and/or rostopic list?

krl101 gravatar image krl101  ( 2019-08-12 05:45:24 -0500 )edit

Heres what my bash file looks like on my master and

export ROS_MASTER_URI=http://localhost:11311/ export ROS_IP=192.20.10.5 export ROS_HOSTNAME=$ROS_IP source ~/catkin_ws/devel/setup.bash source ~/catkin_ws/install_isolated/setup.bash echo "ROS_IP: "$ROS_IP echo "ROS_HOSTNAME: "$ROS_HOSTNAME echo "ROS_MASTER_URI: "$ROS_MASTER_URI

on slave

export ROS_MASTER_URI=http://192.20.10.5:11311/ export ROS_IP=192.20.10.6 export ROS_HOSTNAME=$ROS_IP source ~/catkin_ws/devel/setup.bash source ~/catkin_ws/install_isolated/setup.bash echo "ROS_IP: "$ROS_IP echo "ROS_HOSTNAME: "$ROS_HOSTNAME echo "ROS_MASTER_URI: "$ROS_MASTER_URI

i can see the rosnode list on the slave swell as the topics ackermann_cmd and joy from my master

should my Ros_master_uri be the same?

fyi gravatar image fyi  ( 2019-08-12 07:40:32 -0500 )edit

so i tried rosnode info and it shows

Node [/ackermann_drive_keyop_node] Publications: * /ackermann_cmd [ackermann_msgs/AckermannDriveStamped] * /rosout [rosgraph_msgs/Log]

Subscriptions: None

Services: * /ackermann_drive_keyop_node/get_loggers * /ackermann_drive_keyop_node/set_logger_level

contacting node http://parallels-vm:40139/ ... ERROR: Communication with node[http://parallels-vm:40139/] failed!

fyi gravatar image fyi  ( 2019-08-12 08:08:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-12 10:02:08 -0500

fyi gravatar image

Figured it out. it works now. need to ensure i run my bash setup file in every terminal i open if not things don't work well with other nodes I start. i was opening a new terminal without doing that so for some reason it wasn't sending any information out to the slave..

Thanks.

edit flag offensive delete link more

Comments

1

in your ~/.bashrc you can add:

source /opt/ros/<ros-version>/setup.bash
source /<catkin_ws>/devel/setup.bash

like in: Installing and Configuring Your ROS Environment And every "new" terminal (or after sourceing) is up to date an running.

krl101 gravatar image krl101  ( 2019-08-13 04:18:01 -0500 )edit

Thank you added just needed to ensure i ran it in every terminal/new tab which i didnt

fyi gravatar image fyi  ( 2019-08-13 07:01:42 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-08-11 14:48:42 -0500

Seen: 1,300 times

Last updated: Aug 12 '19