ubc-systopia / cps-gazebo-sim

in development
https://cps-gazebo-sim.readthedocs.io/en/latest/
Apache License 2.0
0 stars 0 forks source link

Enable multiple robot setup with RViz #4

Open irisxu02 opened 1 month ago

irisxu02 commented 1 month ago

Each robot should have its own RViz node, since we want to control and view them individually.

Since the robots are spawned in different namespaces, their descriptions belong to those individual namespaces i.e. in the topic {namespace}/robot_description, accessing /robot_description gives us nothing. Other subscribers and publishers should also created to occupy the same namespace.

ros2 node info /arm4/rviz2 shows the following when using the default view_robot.rviz to create the node:

/arm4/rviz2
  Subscribers:
    /robot_description: std_msgs/msg/String
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /initialpose: geometry_msgs/msg/PoseWithCovarianceStamped
    /clicked_point: geometry_msgs/msg/PointStamped
    /goal_pose: geometry_msgs/msg/PoseStamped
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
  Service Servers:
    /arm4/rviz2/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /arm4/rviz2/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /arm4/rviz2/get_parameters: rcl_interfaces/srv/GetParameters
    /arm4/rviz2/list_parameters: rcl_interfaces/srv/ListParameters
    /arm4/rviz2/set_parameters: rcl_interfaces/srv/SetParameters
    /arm4/rviz2/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

Is there a way to parameterize the rviz config file or use it as a template that could be dynamically updated based on what robots are being spawned?