How to change the topic that odom is published

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?

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

I am able to remap by modification of this file:

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"/>

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


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.

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.