Skip to content

Multi Robile Simulation Navigation Issues Solutions Design Decisions

Deebul Nair edited this page Jun 27, 2023 · 2 revisions

Nav2 in namespace

Running navigation with namespace

Name space problem

running namespace with composition was not starting nodes under proper namespace

https://github.com/ros-planning/navigation2/issues/3606#issuecomment-1587270813

Solution : use_composition:=False

how to check current DDS ?

https://docs.ros.org/en/foxy/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html

starting with namespace new error

[robile_0.amcl] Message filter dropping message frame 'robile_0/base_link' for reason 'timestamp on message is earlier than all the other data in transform cache'

https://github.com/ros-planning/navigation2/issues/3352#issuecomment-1374005889 solution : change from fastdds to cyclone dds

without namespace we dont get the error in transform cache

failed to find a free participant index for domain + cyclone dds

https://stackoverflow.com/questions/74232474/ros2-galacitc-failed-to-find-a-free-participant-index-for-domain Solved by creating cyclondds.xml and adding maxport

solution didnt work stil getting error "the timestamp on the message is earlier than all the data in the transform cache"

Solution

  1. separating the /tf to robile_0/tf and robile_1/tf solved the problem of namespace

How: changes the urdf in generic_spawn.py to add the remapping xml tag

Proble rviz and rqt to visualize

one solution : https://docs.ros.org/en/foxy/How-To-Guides/Node-arguments.html ros2 run demo_nodes_cpp talker --ros-args -r __ns:=/demo -r __node:=my_talker -r chatter:=my_topic

The problem is that the transform listener listens to transform in /tf . Found using rqt_graph and

Solution : remapping rviz launch file with tf remapping same as robot_state_publisher in generic_Gazebo_4_wheel launch file

Problem : the publishers are not in the namespace

ubuntu@ubuntu-container:~$ ros2 node info /robile_0/rviz /robile_0/rviz Subscribers: /clock: rosgraph_msgs/msg/Clock /cost_cloud: sensor_msgs/msg/PointCloud2 /global_costmap/published_footprint: geometry_msgs/msg/PolygonStamped /parameter_events: rcl_interfaces/msg/ParameterEvent /plan_smoothed: nav_msgs/msg/Path /robile_0/global_costmap/costmap: nav_msgs/msg/OccupancyGrid /robile_0/global_costmap/costmap_updates: map_msgs/msg/OccupancyGridUpdate /robile_0/local_costmap/costmap: nav_msgs/msg/OccupancyGrid /robile_0/local_costmap/costmap_updates: map_msgs/msg/OccupancyGridUpdate /robile_0/robot_description: std_msgs/msg/String /robile_0/scan: sensor_msgs/msg/LaserScan Publishers: /clicked_point: geometry_msgs/msg/PointStamped <------ no namespace her /goal_pose: geometry_msgs/msg/PoseStamped /initialpose: geometry_msgs/msg/PoseWithCovarianceStamped /parameter_events: rcl_interfaces/msg/ParameterEvent /rosout: rcl_interfaces/msg/Log Service Servers: /robile_0/rviz/describe_parameters: rcl_interfaces/srv/DescribeParameters /robile_0/rviz/get_parameter_types: rcl_interfaces/srv/GetParameterTypes /robile_0/rviz/get_parameters: rcl_interfaces/srv/GetParameters /robile_0/rviz/list_parameters: rcl_interfaces/srv/ListParameters /robile_0/rviz/set_parameters: rcl_interfaces/srv/SetParameters /robile_0/rviz/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically Service Clients:

Action Servers:

Action Clients:

Solution

add remapping in rviz2 launch which remaps all the plugins

Learnings

  1. ROS Namespace Gazebo plugins .

  2. config params of nav2 with namespace

  3. tf publish , topic namespace, frame_id

  4. rviz2 remappings

  5. nav2 composition problem

  6. nav2 remappings cmd_vel even with namespace