I am running the move_base node with dynamic global_cosmap.
here is global_costmap_params.yaml file:
and costmap_common_params.yaml:
and this is how global costmap looks like in rviz:
you see, robot position starts in the corner, not in the center of global costmap
What can i do to make global costmap centered?
I have mapping node which is publishing the OccupancyGrid. I have a python script that is taking this OccupancyGrid and publishing it in map frame:
#!/usr/bin/env python
import rospy
import tf_conversions
import tf2_ros
import tf2_msgs.msg
import geometry_msgs.msg
import sensor_msgs.msg
import nav_msgs.msg
from std_msgs.msg import String
def handle_map_frame(data):
pub = rospy.Publisher("map", nav_msgs.msg.OccupancyGrid, queue_size=10)
rate = rospy.Rate(10) # 10hz
data.header.frame_id = "/map"
pub.publish(data)
rate.sleep()
if __name__ == '__main__':
rospy.init_node('map_frame_broadcaster')
rospy.Subscriber("/occupancy", nav_msgs.msg.OccupancyGrid, handle_map_frame)
##rospy.Subscriber('/sensor_us', sensor_msgs.msg.Range, handle_camera_pose)
rospy.spin()
Originally posted by june2473 on ROS Answers with karma: 83 on 2019-09-18
Post score: 1