How to update the goal when there is a obstacle

i am trying to do a FUNMAP, but I problem that I said in other post, this makes that I can’t see the robot in rviz, which means that there is a problem with the information of the robot