# How to change the topic that odom is published

**URL:** <https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087>\
**Category:** General Questions\
**Created:** [November 6, 2023, 12:53pm UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087 "2023-11-06T12:53:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkCuck334](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@MarkCuck334](https://forum.ubiquityrobotics.com/u/MarkCuck334)\
**Post date:** [November 6, 2023, 12:53pm UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087/1 "2023-11-06T12:53:08Z")

</div>

Hey. I’m trying to use robot\_localization to merge my wheels odom with an imu, and needed to make so that instead of ubiquity publishing the odometry to /odom topic it publishes on a topic like /ubiquity\_odom. I tried to change it on the remap at core\_launch but it didn’t work at all. How could I do that?

 ![Screenshot from 2023-11-06 09-52-17](https://frm.ubiquityrobotics.com/uploads/default/original/1X/9f6b34c11e6d4b7ca71c455523c0fbf36ed1378f.png)

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [November 7, 2023, 8:12am UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087/2 "2023-11-07T08:12:18Z")

</div>

Please tell us the image you are using. Are you using current 2-9-2023 Noetic image?

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [November 7, 2023, 8:29am UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087/3 "2023-11-07T08:29:09Z")

</div>

I am able to remap by modification of this file:  
~/catkin\_ws/src/magni\_robot/magni\_bringup/launch/core\_launch.em

I did a test using remap to odom\_remap name. More specifically:

```
<node name="motor_node" pkg="ubiquity_motor" type="motor_node">
    <remap from="/ubiquity_velocity_controller/cmd_vel" to="/cmd_vel"/>
    <remap from="/ubiquity_velocity_controller/odom" to="/odom_remap"/>
</node>

```

This became active and ros topic echo /odom\_remap looked good.  
I modified the file then did these to restart motor node:

sudo systemctl stop magni-base.service  
sudo systemctl start magni-base.service

All of above is on current supported latest image of 2-9-2023 Noetic on a Raspberry Pi 4  
And again to be specific: 2023-02-09-ubiquity-base-focal-raspberry-pi.img

Mark

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [November 7, 2023, 8:34am UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087/4 "2023-11-07T08:34:19Z")

</div>

Also note: If the repo of magni\_robot is located in catkin\_ws/src/magni\_robot then ROS does this clever trick and ‘overlays’ your code and launches and EVERYTHING over what is in the default files down in the bowels of the filesystem. Perhaps you modified the file in the ‘bowels’ and you needed to modify the one that gets overlayed. Just a thought.

---

<div class="post-metadata">

**Author:** ![MarkCuck334](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/6f9a4e/32.png) [@MarkCuck334](https://forum.ubiquityrobotics.com/u/MarkCuck334)\
**Post date:** [November 7, 2023, 11:22am UTC](https://forum.ubiquityrobotics.com/t/how-to-change-the-topic-that-odom-is-published/1087/5 "2023-11-07T11:22:45Z")

</div>

Thanks, you are right, I did indeed change only in /opt/ros. Changing the core.launch in the magni\_robot within catkin\_ws did the trick.
