Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrpt_graphslam_mr is not working when robots spawn in a single machine & ros_master with gazebo #1

Open
mhshayesteh opened this issue Jul 28, 2018 · 2 comments

Comments

@mhshayesteh
Copy link

Dear Nikos,

I tried to run the bellow command to see be behaivior of the multi-robot mrpt_graphslam system in gazebo simulation:

rosrun csl_robots_gazebo run_graphslam_demo.sh /home/ros-team/vr2019/src/csl_mr_slam/csl_robots_gazebo/rosbags/simul_input.bag

But after running the demo, I encountered to a problem follows as in attached log file.

Afterward, I tried to test multi robot graph_slam with my simulation environment. Our simulation spawns P3AT robots in a single machine and also single ros_master, for example http://localhost:11311

Next, I executed bellow commands to create mrpt_graphslams node for each my robots to create local slam nodes:

roslaunch mrpt_graphslam_2d run_graphslam_ros.launch robot_ns:=robot0
roslaunch mrpt_graphslam_2d run_graphslam_ros.launch robot_ns:=robot1
roslaunch mrpt_graphslam_2d run_graphslam_ros.launch robot_ns:=robot2

Also you can find nodes graph in attachment.
After running mrpt_graphslam, all of grid_map topics appeared in "rostopic list" successfully.
Then, I decided to test the system with mrpt_graphslam_mr module. But I encountered to a big problem. It seems that ROS_Master node could not successfully register in multi_master system . As you mentioned, We need to run each robot in different machine and ROS master nodes.

I tried to spawn the robots in a single system with different ports, But it was not able to do this trick.
In my goal, I need to have a real-time global map (with merged map system and multi robot system) in our main dashboard.
Based on this problem, What is your opinion for this problem?

Many thanks,
Mohammad Hossein

log-for-csl-robots-gazebo-sh-demo.log
rosgraph

@bergercookie
Copy link
Owner

bergercookie commented Jul 28, 2018

But after running the demo, I encountered to a problem follows as in attached log file.

Current logfile doesn't show any actual error. I suppose there is a wxWidgets window spawned by the application. If you exit that window it will also print out an exception message. That would be a lot more informative.

It seems that ROS_Master node could not successfully register in multi_master system . As you mentioned, We need to run each robot in different machine and ROS master nodes.

Well, you don't have to use different machines, same machine and roscores with different ROS_MASTER_URI would be enough.

I tried to spawn the robots in a single system with different ports, But it was not able to do this trick.

This page lists how to start nodes from the same machine but using a different port:

http://wiki.ros.org/multimaster_fkie/Tutorials/Setup%20a%20ROS%20master%20synchronization

roslaunch mrpt_graphslam_2d run_graphslam_ros.launch robot_ns:=robot0

What's the run_graphslam_ros.launch executuable?

It seems that ROS_Master node could not successfully register in multi_master system

I don't really understand what that means :-)
Could you attach the commands and some logfiles for this?

In my goal, I need to have a real-time global map (with merged map system and multi robot system) in our main dashboard.

That's not possible in real-time. There is a utility script for grabbing all the robot maps and fusing them into a single one (mrpt_slam/mrpt_graphslam_2d/src/map_merger_node.cpp), but that's not designed to be run in real-time

@mhshayesteh
Copy link
Author

This page lists how to start nodes from the same machine but using a different port:
http://wiki.ros.org/multimaster_fkie/Tutorials/Setup%20a%20ROS%20master%20synchronization

I used from this page and successfully run with different ports for each robot with bellow commands:
Robot0:
$export ROS_MASTER_URI=http://localhost:11333
$roscore --port 11333 >/dev/null 2>&1 &
&roslaunch mrpt_graphslam_2d setup_robot_for_mr_demo.launch new_robot_ns:=robot0
Robot1:
$export ROS_MASTER_URI=http://localhost:11334
$roscore --port 11334 >/dev/null 2>&1 &
&roslaunch mrpt_graphslam_2d setup_robot_for_mr_demo.launch new_robot_ns:=robot1
But mrpt_graph slam could not publish map topics and etc. When I ran in single mode published topics appears like this information:
/robot0/feedback/graphslam_stats
/robot0/feedback/gridmap
/robot0/feedback/odom_trajectory
/robot0/feedback/robot_position
/robot0/feedback/robot_tr_poses
/robot0/feedback/robot_trajectory
/robot0/input/laser_scan
/robot0/input/odom
and I can see map in drawer window. When I am using mrpt_graphslam mr mode, It just connect to multi master system but does not publish any map and another information.
Here is my log file after running this scenario and also launch files:
robot0.log
robot1.log

setup_robot_for_mr_demo.txt
sr_graphslam_demounch.txt
graphslam.txt

What's the run_graphslam_ros.launch executuable?

This launch file is prepared by myself and I can successfully run a mrpt_graphslam node for each robot locally. Here you can find this file:
run_graphslam_ros.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants