0
$\begingroup$

Rosanswers logo

Hi,

I have 2 machines on the same network. Machine A has master ros uri and has lidar attached. It is the publisher of lidar topic. I wish to run rviz on machine B to view the output of lidar on machine A. I wrote a subscription method on machine B. When i run rviz, rviz subscribes to machine A instead of using the already subscribed node to machine A.

How do I ask rviz to get data from my subscription instead of having rviz subscribes again to lidar topic.


Originally posted by learner88 on ROS Answers with karma: 20 on 2015-11-05

Post score: 0


Original comments

Comment by dornhege on 2015-11-05:
Can you describe your exact setup, i.e., what nodes on what machine subscribing/publishing which topics - and also what kind of setup you want to achieve. For me, right now, it seems you want to do something that doesn't make sense.

Comment by ParitoshKelkar on 2015-11-05:
Does your subscriber on MachineB publish anything? If you are modifying the incoming laser data and then re-publishing it, you could then on rviz, view only the new 're-published' topic.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you set

export ROS_MASTER_URI=http://<MACHINE_A_IP>:11311
export ROS_IP=<MACHINE_B_IP> 

in your .bashrc file (located in your /home/ directory), and run source ~/.bashrc in the terminal, when you run rviz in that terminal, you will subscribe to topics in Machine A's ROS network.

Is this what you ask?


Originally posted by Akif with karma: 3561 on 2015-11-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by learner88 on 2015-11-06:
Hi Akif, i am able to run rviz. but when i run roslaunch hector_slam_launch neato.launch, the GUI appeared has error status saying Fixed Frame [map] does not exist. Do you have any idea why? Thank u.

Comment by Akif on 2015-11-06:
map frame should be published by your slam node. Can you run rosrun tf view_frames and post the resulting tf tree here?

Comment by learner88 on 2015-11-06:
here is the tf tree: odom->base_link(Broadcaster: /map_to_odom; Avg rate: 96.613 Hz; Most recent transform: 1446792454.255,-0.007 sec old; Buffer len: 4.948sec) base_link->laser(Broadcaster: /base_frame_laser;Avg rate: 96.785Hz; Most recent transform: 1446792454.256,-0.008 sec old; Buffer len: 4.949

Comment by Akif on 2015-11-06:
It seems like no one is transforming from map to odom. For now you can change "Global Options->Fixed Frame" option to odom in rviz. After that you can ask a separate question for your setup with hector slam.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.