Task #219
Updated by Sanghoon Lee about 1 month ago
This package is std_xela_taxel_viz_2f, a marker publisher for 2F sensor data visualization in an isolated environment.
I plan to develop a visualization app that subscribes to sensor data topics provided by xela_server2_2f and publishes markers in an isolated environment for visualization.
Therefore, I plan to develop a standalone Taxel visualization app that operates identically to xela_taxel_viz_2f but publishes separate /robot_description and /joint_states without affecting the robot control environment.
This app publishes data to the Marker topic, allowing RViz and other ROS apps to easily subscribe to this marker topic for visualization.
This std_xela_taxel_viz_2f supports three target models:
- uSPr2F,
- uSPrDS,
- uSPrHE35
These supported models can be selected as parameters during runtime, using pre-prepared profiles for each model.
----------------
!{width:800px}clipboard-202602160015-z4pat.png!
---------------
h1. std_xela_taxel_viz_2f
h2. 1. Goal
Provide a standalone 2F tactile visualization path that does not interfere with robot-control stack topics.
h2. 2. System Context
* Input:
** @/x_taxel_2f@
** joint states from @/joint_states@ (global) or @/<ns>/joint_states@ (local)
* Output:
** @/<ns>/markers@
** local TF streams @/<ns>/tf@, @/<ns>/tf_static@
h2. 3. Runtime Components
h3. 3.1 std_xela_taxel_viz_2f_node
* Computes baseline/deadband.
* Supports @grid@ and @urdf@ placement logic.
* Publishes marker arrays.
h3. 3.2 robot_state_publisher (URDF mode only)
* Uses local xacro: @description/xela_<model>_2_modules.xacro@.
* Subscribes to selected joint_states topic.
* Publishes TF under namespace-local remap.
h3. 3.3 std_xela_joint_state_publisher_node (URDF + local mode)
* Emits static/default joint list from config profile.
* Removes dependency on external controller stack for URDF visualization.
h3. 3.4 All-in-one wrappers
* Sim all-in-one includes @sim_xela_server@ and @xela_server2_2f@.
* Real all-in-one includes @xela_server2_2f@ real server launch.
* Both start RViz with local TF remapping.
h2. 4. Configuration Strategy
* Base defaults: @config/base/std_xela_taxel_viz_2f.yaml@
* Model/mode overrides: @config/models/<model>/<mode>.yaml@
* Joint profiles: @config/joints/joint_state_profiles.yaml@
Resolution order:
# Base config
# Model/mode config
# Launch overrides
h2. 5. TF Isolation Strategy
* Default namespace: @xviz2f@.
* @/tf@ and @/tf_static@ are remapped to local topics (@tf@, @tf_static@) inside namespace.
* RViz all-in-one remaps back to @/<ns>/tf@ and @/<ns>/tf_static@.
* @frame_prefix@ defaults empty; isolation is achieved by topic namespace.
h2. 6. Visualization Modes
h3. 6.1 Grid mode
* Uses configured rows/cols/index map.
* Generates grid plane + circles + arrows.
h3. 6.2 URDF mode
* Uses taxel link frames from local robot description.
* Optional grid overlay via @overlay_grid_in_urdf@.
h2. 7. Timing Policy
* @marker_stamp_mode@ (@keep|now|zero@)
* @marker_time_offset_sec@ (negative default) to reduce TF extrapolation warnings.
h2. 8. Key Decisions
* Keep package standalone from control controllers.
* Provide local joint-state publisher for URDF mode.
* Reuse shared URDF/mesh assets from @xela_models@.
h2. 9. Acceptance Criteria
* Works with only @/x_taxel_2f@ plus optional local joint states.
* Sim and real all-in-one launches bring up full visualization chain.
* TF and marker streams are isolated to namespace-local topics.
* @uSPr2F@, @uSPrDS@, @uSPrHE35@ configs load correctly per mode.
-----------------
h1. README
Standalone visualization package for Xela 2F taxel sensors.
It runs independently from robot control stack and uses namespace-local TF topics.
h2. Purpose
* Input only tactile stream (@/x_taxel_2f@) plus joint states.
* Output markers on @/<namespace>/markers@.
* Support @grid@ and @urdf@ visualization.
* Keep TF traffic local by remapping @/tf@ and @/tf_static@ to @/<namespace>/tf@ and @/<namespace>/tf_static@.
h2. Requirements
* ROS 2 Humble
* @xela_taxel_msgs@
* @xela_models@
* @xela_server2_2f@ (all-in-one launch)
* @sim_xela_server@ (sim all-in-one launch)
h2. Install Dependencies (rosdep)
<pre><code>
WS=~/xela_robotics/02_dev_ws
sudo sh -c "echo 'yaml file://${WS}/src/xela_apps/rosdep/xela_taxel_viz_deps.yaml' > /etc/ros/rosdep/sources.list.d/98-xela-taxel-viz.list"
rosdep update
rosdep install --from-paths ${WS}/src/xela_apps/std_xela_taxel_viz_2f -r -y --ignore-src
</code></pre>
h2. Build
<pre><code>
cd ~/xela_robotics/02_dev_ws
colcon build --packages-select std_xela_taxel_viz_2f
source install/setup.bash
</code></pre>
h2. Quick Start
Basic launch (default: grid mode):
<pre><code>
ros2 launch std_xela_taxel_viz_2f std_xela_taxel_viz_2f.launch.py
</code></pre>
URDF mode with local joint states:
<pre><code>
ros2 launch std_xela_taxel_viz_2f std_xela_taxel_viz_2f.launch.py viz_mode:=urdf joint_states_mode:=local
</code></pre>
URDF mode with external @/joint_states@:
<pre><code>
ros2 launch std_xela_taxel_viz_2f std_xela_taxel_viz_2f.launch.py viz_mode:=urdf joint_states_mode:=global
</code></pre>
h2. All-in-One Launch
Sim all-in-one (@sim_xela_server + xela_server2_2f + std_xela_taxel_viz_2f + rviz2@):
<pre><code>
ros2 launch std_xela_taxel_viz_2f sim_all_svc_std_xela_taxel_viz_2f.launch.py
</code></pre>
Sim all-in-one with model and mode options:
<pre><code>
ros2 launch std_xela_taxel_viz_2f sim_all_svc_std_xela_taxel_viz_2f.launch.py viz_model_name:=uSPrDS server_model_name:=uSPrDS viz_mode:=urdf joint_states_mode:=local
</code></pre>
Real all-in-one (@xela_server2_2f + std_xela_taxel_viz_2f + rviz2@):
<pre><code>
ros2 launch std_xela_taxel_viz_2f real_all_svc_std_xela_taxel_viz_2f.launch.py
</code></pre>
h2. Default Launch Arguments
h3. std_xela_taxel_viz_2f.launch.py
* @namespace@: @xviz2f@
* @viz_mode@: @grid@
* @model_name@: @uSPr2F@
* @model_params_file@: @config/models/<model_name>/<viz_mode>.yaml@
* @style_preset@: @default@
* @overlay_grid_in_urdf@: @false@
* @marker_stamp_mode@: @now@
* @marker_time_offset_sec@: @-0.12@
* @frame_id@: @world@
* @frame_prefix@: empty (recommended)
* @joint_states_mode@: @local@
* @joint_states_config_yaml@: @config/joints/joint_state_profiles.yaml@
* @joint_states_device_profile@: @<model_name>@
h3. sim_all_svc_std_xela_taxel_viz_2f.launch.py
* @namespace@: @xviz2f@
* @viz_model_name@: @uSPr2F@
* @server_model_name@: @<viz_model_name>@
* @viz_mode@: @grid@
* @joint_states_mode@: @local@
* @frame_prefix@: empty
* @marker_stamp_mode@: @now@
* @marker_time_offset_sec@: @-0.12@
* @preset@: @normal@
* @publish_period_ms@: @200@
* @sine_freq_hz@: @0.05@
* @integer_z_range@: @10085.0@
* @calib_z_range@: @14.0@
* @z_bias_power@: @1.0@
h3. real_all_svc_std_xela_taxel_viz_2f.launch.py
* @namespace@: @xviz2f@
* @viz_model_name@: @uSPr2F@
* @viz_mode@: @urdf@
* @joint_states_mode@: @local@
* @can_port@: @can0@
* @ws_host@: @localhost@
* @ws_port@: @5000@
h2. TF and Joint States Isolation
* @robot_state_publisher@ remaps:
** @/tf -> tf@
** @/tf_static -> tf_static@
* RViz in all-in-one launch is remapped to @/<ns>/tf@ and @/<ns>/tf_static@.
* Local mode uses @std_xela_joint_state_publisher_node@ to publish @/<ns>/joint_states@.
* Keep @frame_prefix@ empty unless explicit prefixed frame names are required.
h2. Config Layout
* Base: @config/base/std_xela_taxel_viz_2f.yaml@
* Model overrides:
** @config/models/uSPr2F/grid.yaml@, @urdf.yaml@
** @config/models/uSPrDS/grid.yaml@, @urdf.yaml@
** @config/models/uSPrHE35/grid.yaml@, @urdf.yaml@
* Joint profiles: @config/joints/joint_state_profiles.yaml@
* RViz: @config/rviz/@
h2. Troubleshooting
* Missing xacro in install space:
<pre><code>
colcon build --packages-select std_xela_taxel_viz_2f --symlink-install
source install/setup.bash
</code></pre>
* URDF model collapsed in RViz:
** Keep @frame_prefix@ empty, or
** Set RViz RobotModel @TF Prefix@ and @Fixed Frame@ to matching prefixed names.
* TF extrapolation warnings:
** Use @marker_stamp_mode:=now@ and negative @marker_time_offset_sec@.
h2. Related Redmine Docs
* @design_std_xela_taxel_viz_2f.textile@
* @fsd_std_xela_taxel_viz_2f.textile@
--------------
!{width:800px}clipboard-202602211606-nlkyw.png!