# Cartographer and Navigation workable in beta2?

**URL:** <https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074>\
**Category:** ROS General\
**Created:** [June 28, 2017, 6:34am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074 "2017-06-28T06:34:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [June 28, 2017, 6:34am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/1 "2017-06-28T06:34:24Z")

</div>

I can reproduce follower function in turtlebot\_demo with latest code. Actually I am also very interested in the progress of Cartographer and navigation in ROS2, I’d like to know, is it ready to show demo of them in beta2? thanks a lot.

---

<div class="post-metadata">

**Author:** ![clalancette](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/clalancette/32/4797_2.png) [@clalancette](https://discourse.openrobotics.org/u/clalancette)\
**Post date:** [June 28, 2017, 1:32pm UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/2 "2017-06-28T13:32:40Z")

</div>

Yes, in beta2 we will have demos for cartographer, follower, and localization, all running on the Turtlebot2. We are still moving around some of the pieces, and we need to update the documentation, so stay tuned.

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [June 28, 2017, 2:16pm UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/3 "2017-06-28T14:16:25Z")

</div>

look forward to these demos

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [July 14, 2017, 1:25am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/4 "2017-07-14T01:25:10Z")

</div>

I am trying to reproduce cartographer demo following the instructions in [GitHub - ros2/turtlebot2\_demo](https://github.com/ros2/turtlebot2_demo). And I use ros1\_bridge and rviz to visualize the slam. However, I can’t see anything in rivz, and in ros1\_bridge, I can see a lot of error:

failed to create 2to1 bridge for topic ‘/tf’ with ROS 2 type ‘tf2\_msgs/TFMessage’ and ROS 1 type ‘’: No template specialization for the pair  
check the list of supported pairs with the `--print-pairs` option  
failed to create 2to1 bridge for topic ‘/tf\_static’ with ROS 2 type ‘tf2\_msgs/TFMessage’ and ROS 1 type ‘’: No template specialization for the pair

I have also tried talker/listener sample using ros1\_bridge, both direction work fine.

---

<div class="post-metadata">

**Author:** ![dhood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dhood/32/1121_2.png) [@dhood](https://discourse.openrobotics.org/u/dhood)\
**Post date:** [July 14, 2017, 1:41am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/6 "2017-07-14T01:41:49Z")

</div>

what release version of ROS 2 are you using? did you build the bridge yourself or are you using pre-built binaries? the bridge error messages you see suggest you’re either using an outdated version of `ros1_bridge` or that you have custom-built the `ros1_bridge` yourself and are missing support for TF2 messages.

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [July 14, 2017, 1:56am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/7 "2017-07-14T01:56:09Z")

</div>

I build from latest source code, [https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos](https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos)  
src/ament/ament\_tools/scripts/ament.py build --build-tests --symlink-install

---

<div class="post-metadata">

**Author:** ![dhood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dhood/32/1121_2.png) [@dhood](https://discourse.openrobotics.org/u/dhood)\
**Post date:** [July 14, 2017, 2:32am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/8 "2017-07-14T02:32:38Z")

</div>

I suspect that your bridge has only been built with minimal message support (you can verify this with the `--print-pairs` option as suggested). It needs to be built in a particular way to get tf2\_msgs and nav\_msgs etc support.

Please either switch to using the bridge from binaries, or follow these instructions to build the bridge from source: [ros1\_bridge/README.md at master · ros2/ros1\_bridge · GitHub](https://github.com/ros2/ros1_bridge/blob/master/README.md#build-the-bridge-from-source)

This is mentioned in the demo instructions but I’ll update it to highlight that this step requires particular attention.

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [July 14, 2017, 2:51am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/9 "2017-07-14T02:51:46Z")

</div>

With beta2 release binary code, it is really workable. However, beta2 binary doesn’t include turtulebot\_demo, so I can’t try cartographer and navigation. So, I’d suggest you release a full version for beta2, so user can easily evaluate the capabilities of ROS2. thanks a lot.

---

<div class="post-metadata">

**Author:** ![dhood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dhood/32/1121_2.png) [@dhood](https://discourse.openrobotics.org/u/dhood)\
**Post date:** [July 14, 2017, 3:10am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/10 "2017-07-14T03:10:33Z")

</div>

beta2 binaries for the turtlebot2 demo can be installed from debian packages if you don’t want to build the demo from source: [GitHub - ros2/turtlebot2\_demo](https://github.com/ros2/turtlebot2_demo#installation-from-binaries)

hope this helps

---

<div class="post-metadata">

**Author:** ![marguedas](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/marguedas/32/1633_2.png) [@marguedas](https://discourse.openrobotics.org/u/marguedas)\
**Post date:** [July 14, 2017, 3:21am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/11 "2017-07-14T03:21:00Z")

</div>

It looks like the bridge is not listed in the turtlebot instructions.  
please run `sudo apt install ros-r2b2-ros1-bridge` to install the bridge

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [July 14, 2017, 5:21am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/12 "2017-07-14T05:21:36Z")

</div>

After resolve the ros1\_bridge issue, ros1\_bridge output looks ok now. In rviz, I can see /depth image, however I can’t see any map established? /map and /scan topic have noting to show. do I miss something?

I follow below steps

launch `ros2 pkg prefix turtlebot2_cartographer`/share/turtlebot2\_cartographer/launch/turtlebot\_carto\_2d.py

Terminal A:

. /opt/ros/kinetic/setup.bash  
roscore

Terminal B:

. /opt/ros/kinetic/setup.bash  
. \<YOUR\_ROS2\_WORKSPACE\>  
ros2 run ros1\_bridge dynamic\_bridge

Terminal C:

. /opt/ros/kinetic/setup.bash  
rosrun rviz rviz

---

<div class="post-metadata">

**Author:** ![jwang11](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jwang11/32/1195_2.png) [@jwang11](https://discourse.openrobotics.org/u/jwang11)\
**Post date:** [July 17, 2017, 3:57am UTC](https://discourse.openrobotics.org/t/cartographer-and-navigation-workable-in-beta2/2074/14 "2017-07-17T03:57:32Z")

</div>

Finally, I can see /map now. cartographer and AMCL are workable. However, I don’t see the instruction how to specify a goal and navigate Robot to it with collision avoidance. is it supported by current ROS2?
