I'm new to ROS, I'm trying to create a map with V-REP USING hector_slam, but I'm not able to make the map appear on rviz, can someone help me?

asked 2020-04-15 11:31:15 -0600

Higor gravatar image

ROS, lunar, hector_slam, v-rep coppelia, map, slam.

edit retag flag offensive close merge delete

Comments

Hi, there is way to little information in your post to really help you. Is the map server working is rviz configured? In rviz there is a section where you can add for example topics you can choose in the dialog to show availabe data, if your map is there just ad it. However as I said most likely its more complex.

Dragonslayer gravatar image Dragonslayer  ( 2020-04-15 11:46:24 -0600 )edit

Please help me, I need to do this scene for my course completion work, I've tried everything

Higor gravatar image Higor  ( 2020-04-15 12:25:15 -0600 )edit

I'm trying to create the transformation tree by V-REP, I'm using the rosinterface, but when I create the tree and run it, roslaunch hector_slam_launch autonomo.launch, it opens the rviz, but it doesn't show the map, nor the laser data, Could you help me?

This is the link to the moon code, if you prefer I can share everything from catkin_ws

https://drive.google.com/open?id=1SgS...

Higor gravatar image Higor  ( 2020-04-15 12:28:12 -0600 )edit

i need help

Higor gravatar image Higor  ( 2020-04-15 12:52:34 -0600 )edit

Maybe rviz just isnt configured, post a screenshot. what does "rostopic list" show? what does "rosnode list" show? Post the screenshots.

Dragonslayer gravatar image Dragonslayer  ( 2020-04-15 13:51:55 -0600 )edit

rostopic list /map /clicked_point /clock /cmd_vel /initialpose /move_base_simple/goal /odom /rosout /rosout_agg /scan /tf /tf_static

Higor gravatar image Higor  ( 2020-04-15 13:54:08 -0600 )edit

Need more info, as I said maybe its just rviz isnt configured to show the map, or the map is Null and there is just nothing to see yet etc...

Dragonslayer gravatar image Dragonslayer  ( 2020-04-16 09:38:29 -0600 )edit

def map_stuff(): rospy.init_node("auto_map", anonymous=True) global pub_map pub_map = rospy.Publisher('/map', OccupancyGrid, latch=True) while not rospy.is_shutdown(): create_map() rospy.spin()

def create_map(): test_map = OccupancyGrid() test_map.header.seq = 0 test_map.header.stamp.secs = rospy.get_rostime().secs test_map.header.stamp.nsecs = rospy.get_rostime().nsecs test_map.header.frame_id = "/world" test_map.info.resolution = 1.0 test_map.info.width = 10 test_map.info.height = 10 test_map.info.origin.position.x = -5.0 test_map.info.origin.position.y = -5.0 test_map.info.origin.position.z = 0.0 test_map.info.origin.orientation.x = 0.0 test_map.info.origin.orientation.y = 0.0 test_map.info.origin.orientation.z = 0.0 test_map.info.origin.orientation.w = 0.0 test_map.data = [] for i in range(0, 100): test_map.data.append(i) pub_map.publish(test_map) return

if __name__ == "__main__": map_stuff()

Higor gravatar image Higor  ( 2020-04-24 08:05:01 -0600 )edit