How to keep occupancy grid map in rviz all over the time?

915 views
Skip to first unread message

zheng rong

unread,
Oct 24, 2017, 11:18:57 PM10/24/17
to google-cartographer
Hi all,

When running Cartographer with rviz, I found that the occupancy grid map will disappear after some time, and only part of the map displayed in rviz, like this:

I tried to locate the setting entry related to map display in configuration lua file and launch file, but found nothing.
So how to keep the complete grid map in rviz? And why it is set to show only part of the map? computing expensive?

Thanks,
Zheng

Holger Rapp

unread,
Oct 25, 2017, 3:25:16 AM10/25/17
to zheng rong, google-cartographer
On Wed, Oct 25, 2017 at 5:18 AM, zheng rong <zheng....@gmail.com> wrote:
Hi all,

When running Cartographer with rviz, I found that the occupancy grid map will disappear after some time, and only part of the map displayed in rviz, like this:


​This is actually a feature: we only show a slice of z around your current pose of the tracking frame. It would be feasible to make this slice configurable in rViz, but this is not implemented.​ The whole grid is there, it is just not displayed.

Your quickest way to getting the full X-Ray is to run through your whole bag and feed your .pbstream and the .bag to the asset writer, generating a top-down X-Ray.

I tried to locate the setting entry related to map display in configuration lua file and launch file, but found nothing.
​​
So how to keep the complete grid map in rviz? And why it is set to show only part of the map? computing expensive?
​​

Thanks,
Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cartographer/dde34b6f-d38e-4b1c-bc8d-19b4a63a991d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Google Germany GmbH
Erika-Mann-Straße 33
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

zheng rong

unread,
Oct 25, 2017, 10:06:34 PM10/25/17
to google-cartographer
Thanks for your reply, Holger. 
I will try that according to your suggestion.

Zheng

在 2017年10月25日星期三 UTC+8下午3:25:16,Holger Rapp写道:


On Wed, Oct 25, 2017 at 5:18 AM, zheng rong <zheng....@gmail.com> wrote:
Hi all,

When running Cartographer with rviz, I found that the occupancy grid map will disappear after some time, and only part of the map displayed in rviz, like this:


​This is actually a feature: we only show a slice of z around your current pose of the tracking frame. It would be feasible to make this slice configurable in rViz, but this is not implemented.​ The whole grid is there, it is just not displayed.

Your quickest way to getting the full X-Ray is to run through your whole bag and feed your .pbstream and the .bag to the asset writer, generating a top-down X-Ray.

I tried to locate the setting entry related to map display in configuration lua file and launch file, but found nothing.
​​
So how to keep the complete grid map in rviz? And why it is set to show only part of the map? computing expensive?
​​

Thanks,
Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.

zheng rong

unread,
Nov 6, 2017, 3:26:24 AM11/6/17
to google-cartographer
Hi Holger,

I tried to get the full x-ray result using asset writer, but the result seems weird.
The x-ray provided by Cartographer is very neat, but what I get is messy. The online submap result on Rviz looks reasonable, so what would be the reason for this bad x-ray?

I am using the 3D backpack dataset provided by Cartographer, and use the horizontal-LiDAR and IMU data in the configuration.

Thanks,
Zheng


Holger Rapp

unread,
Nov 6, 2017, 4:06:23 AM11/6/17
to zheng rong, google-cartographer
On Mon, Nov 6, 2017 at 9:26 AM, zheng rong <zheng....@gmail.com> wrote:
Hi Holger,

I tried to get the full x-ray result using asset writer, but the result seems weird.
The x-ray provided by Cartographer is very neat, but what I get is messy. The online submap result on Rviz looks reasonable, so what would be the reason for this bad x-ray?

​This X-ray shows that your SLAM did not track I would say - everything is smeared out.​

I am using the 3D backpack dataset provided by Cartographer, and use the horizontal-LiDAR and IMU data in the configuration.

​Zheng, it is very opaque what you are actually doing to me. Could you post the code/configuration changes you did on GitHub and provide commandline and output of the commands somewhere. With the current information all I can really say is that something is wrong.​ If you use our data, all you need to do for a good X-Ray is doing:

# Download the 3D backpack example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-14-14-00.bag

# Launch the 3D offline demo.
roslaunch cartographer_ros offline_backpack_3d.launch bag_filenames:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag
​​
​# ​Run the asset writer pipeline.
​​
roslaunch cartographer_ros assets_writer_backpack_3d.launch \
​​

   bag_filenames:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag \
   pose_graph_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag.pbstream
​​

Thanks,
Zheng


--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

zheng rong

unread,
Nov 6, 2017, 10:56:22 PM11/6/17
to google-cartographer
Hi Holger,

I re-run the code and save some results on Github, trying to make it convenient for you to help.

The changes I made on the cartographer is listed in: https://github.com/zheng-rong/cartographer_patch/blob/master/mypatch.diff
After running the offline_node, the final part of the output from the command line: https://github.com/zheng-rong/cartographer_patch/blob/master/output_cartographer_offline.txt

Also some Rviz outptu snapshot and assets_writer results are saved in the folder. /png and /rviz

Thanks a lot,

Zheng

Holger Rapp

unread,
Nov 7, 2017, 3:45:22 AM11/7/17
to zheng rong, google-cartographer
​​


On Tue, Nov 7, 2017 at 4:56 AM, zheng rong <zheng....@gmail.com> wrote:
Hi Holger,

I re-run the code and save some results on Github, trying to make it convenient for you to help.

The changes I made on the cartographer is listed in: https://github.com/zheng-rong/cartographer_patch/blob/master/mypatch.diff
+ tracking_frame = "imu_link", --base_link
this explains what you see. Why did you change the tracking frame to be the IMU link? I mean you can of course, but base_link is the backpack base frame, now you track the IMU (which is mounted upside down). If you change it here, you also need to change it in the asset_writer*.lua files, since our IMU and the base link are 180 degrees rotated (as you can see in the URDF). This should fix the weird X-Rays you see.

​​
After running the offline_node, the final part of the output from the command line: https://github.com/zheng-rong/cartographer_patch/blob/master/output_cartographer_offline.txt

Also some Rviz outptu snapshot and assets_writer results are saved in the folder. /png and /rviz

Thanks a lot,

Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

zheng rong

unread,
Nov 7, 2017, 4:38:34 AM11/7/17
to google-cartographer
Oh, I got it. The map is correct now. Thanks a lot. 
I am a little confused by the frames defined in the backpack_3d.lua. What is the meaning of "tracking_frame"? Or what is it used for? Will it affect the SLAM core algorithm?
If I use my own device configuration and bagfile, I will only need to change the TF of LiDAR and IMU in URDF, right?

Best,
Zheng

在 2017年11月7日星期二 UTC+8下午4:45:22,Holger Rapp写道:
​​


On Tue, Nov 7, 2017 at 4:56 AM, zheng rong <zheng....@gmail.com> wrote:
Hi Holger,

I re-run the code and save some results on Github, trying to make it convenient for you to help.

The changes I made on the cartographer is listed in: https://github.com/zheng-rong/cartographer_patch/blob/master/mypatch.diff
+ tracking_frame = "imu_link", --base_link
this explains what you see. Why did you change the tracking frame to be the IMU link? I mean you can of course, but base_link is the backpack base frame, now you track the IMU (which is mounted upside down). If you change it here, you also need to change it in the asset_writer*.lua files, since our IMU and the base link are 180 degrees rotated (as you can see in the URDF). This should fix the weird X-Rays you see.

​​
After running the offline_node, the final part of the output from the command line: https://github.com/zheng-rong/cartographer_patch/blob/master/output_cartographer_offline.txt

Also some Rviz outptu snapshot and assets_writer results are saved in the folder. /png and /rviz

Thanks a lot,

Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.

Holger Rapp

unread,
Nov 7, 2017, 5:35:16 AM11/7/17
to zheng rong, google-cartographer
On Tue, Nov 7, 2017 at 10:38 AM, zheng rong <zheng....@gmail.com> wrote:
Oh, I got it. The map is correct now. Thanks a lot. 
I am a little confused by the frames defined in the backpack_3d.lua. What is the meaning of "tracking_frame"? Or what is it used for? Will it affect the SLAM core algorithm?

tracking_frame is ​the frame that you want to track through the world, i.e. it will start at pose zero and move from there. The SLAM works the same, no matter which frame you use (caveat below). All sensor data will be transformed from their sensor frame into the tracking_frame in Cartographer ROS, and the Cartographer library only deals with data in tracking_frame.

Caveat: if you have an IMU, your tracking_frame must be collocated with the IMU, i.e. it can be rotated, but the translation must be zero. The reason is that you cannot transform IMU data (linear accelerations + angular velocities) into another frame.

​​
If I use my own device configuration and bagfile, I will only need to change the TF of LiDAR and IMU in URDF, right?

​Besides the caveat, this is correct.​

​​

Best,
Zheng

在 2017年11月7日星期二 UTC+8下午4:45:22,Holger Rapp写道:
​​


On Tue, Nov 7, 2017 at 4:56 AM, zheng rong <zheng....@gmail.com> wrote:
Hi Holger,

I re-run the code and save some results on Github, trying to make it convenient for you to help.

The changes I made on the cartographer is listed in: https://github.com/zheng-rong/cartographer_patch/blob/master/mypatch.diff
+ tracking_frame = "imu_link", --base_link
this explains what you see. Why did you change the tracking frame to be the IMU link? I mean you can of course, but base_link is the backpack base frame, now you track the IMU (which is mounted upside down). If you change it here, you also need to change it in the asset_writer*.lua files, since our IMU and the base link are 180 degrees rotated (as you can see in the URDF). This should fix the weird X-Rays you see.

​​
After running the offline_node, the final part of the output from the command line: https://github.com/zheng-rong/cartographer_patch/blob/master/output_cartographer_offline.txt

Also some Rviz outptu snapshot and assets_writer results are saved in the folder. /png and /rviz

Thanks a lot,

Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsubscribe...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.
Google Germany GmbH

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

zheng rong

unread,
Nov 7, 2017, 9:23:24 AM11/7/17
to google-cartographer
Got it! Thanks a lot for your clear explanation.

Best wishes,
Zheng

在 2017年11月7日星期二 UTC+8下午6:35:16,Holger Rapp写道:


On Tue, Nov 7, 2017 at 10:38 AM, zheng rong <zheng....@gmail.com> wrote:
Oh, I got it. The map is correct now. Thanks a lot. 
I am a little confused by the frames defined in the backpack_3d.lua. What is the meaning of "tracking_frame"? Or what is it used for? Will it affect the SLAM core algorithm?

tracking_frame is ​the frame that you want to track through the world, i.e. it will start at pose zero and move from there. The SLAM works the same, no matter which frame you use (caveat below). All sensor data will be transformed from their sensor frame into the tracking_frame in Cartographer ROS, and the Cartographer library only deals with data in tracking_frame.

Caveat: if you have an IMU, your tracking_frame must be collocated with the IMU, i.e. it can be rotated, but the translation must be zero. The reason is that you cannot transform IMU data (linear accelerations + angular velocities) into another frame.

​​
If I use my own device configuration and bagfile, I will only need to change the TF of LiDAR and IMU in URDF, right?

​Besides the caveat, this is correct.​

​​

Best,
Zheng

在 2017年11月7日星期二 UTC+8下午4:45:22,Holger Rapp写道:
​​


On Tue, Nov 7, 2017 at 4:56 AM, zheng rong <zheng....@gmail.com> wrote:
Hi Holger,

I re-run the code and save some results on Github, trying to make it convenient for you to help.

The changes I made on the cartographer is listed in: https://github.com/zheng-rong/cartographer_patch/blob/master/mypatch.diff
+ tracking_frame = "imu_link", --base_link
this explains what you see. Why did you change the tracking frame to be the IMU link? I mean you can of course, but base_link is the backpack base frame, now you track the IMU (which is mounted upside down). If you change it here, you also need to change it in the asset_writer*.lua files, since our IMU and the base link are 180 degrees rotated (as you can see in the URDF). This should fix the weird X-Rays you see.

​​
After running the offline_node, the final part of the output from the command line: https://github.com/zheng-rong/cartographer_patch/blob/master/output_cartographer_offline.txt

Also some Rviz outptu snapshot and assets_writer results are saved in the folder. /png and /rviz

Thanks a lot,

Zheng

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.
Google Germany GmbH

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages