I was curious to see the relat time plot of the path of the quadcopter in gazebo. I looked into rviz, however I am unable to view the robot model in rviz. Has anyone done this ? I needed a starting point. I have been following the tutorial mentioned http://gazebosim.org/tutorials?tut=drcsim_visualization&cat=. However installing drcsim is giving me errors, since I am using ROS kinetic. Please can someone help me regarding this ?
Thanks much !
Here is the link on how to setup SITL gazebo for PX4: https://dev.px4.io/en/simulation/gazebo.html
I hope that helps!
Thanks much @baumanta ! I tried that, however I was unable to do it.
Ok, it is not really clear to me where you are stuck. Does SITL work for you? Can you start the simulation and see the fcu frame moving in rviz? If not, what did you try and how did it fail?
Hello @baumanta ! Yes SITL works for me ! I just want to visualize the trajectory of the quad in rviz. Here is the screenshot of my rviz screen. I see nothing, do I have to attach a marker at my frame to visualize it. Thanks much for your time on this !
Please note that the quadcopter is flying in gazebo.
ok, that looks good so far. Now you only have to add rostopics. In RVIZ go to ADD -> by topic and add what you want to see (e.g. /mavros/local_position/pose)
Thanks much @baumanta ! I tried that earlier, however I do not see anything in rviz. Here is the rviz screen,
It seems like the simulation is running correctly. But you seem to have a frame problem as you can see in the transform error. I suggest you try a few different Global Options -> Fixed frames. And maybe try:
rosrun tf view_frames
This might give us an idea, why it is complaining about a frame called “map”
Because the topic /mavros/local_position/pose should be published in local_origin frame and you set the fixed frame to fcu. It is not clear to me from that why Rviz is looking for a frame called “map”.
Thanks much @baumanta ! Yesterday I used map as my fixed frame, and was able to view pose from mavros. However global status had a warning sign. (It goes green only when I choose fcu as my fixed frame). There is some problem with frames. I will check and keep you posted.