Add a manipulator demo using Electron + rclnodejs#1264
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive manipulator demo to the Electron examples, showcasing a two-joint robotic arm visualization using rclnodejs and Three.js. The demo provides interactive control through sliders, automatic animation modes, and real-time ROS2 integration.
Key changes:
- Adds a complete Two-Joint Manipulator demo application with 3D visualization
- Updates README documentation to feature both turtle_tf2 and manipulator demos in a structured table format
- Implements ROS2 joint state publishing/subscribing with visual feedback
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/npmjs-readme.md | Updates demo section with structured table showcasing turtle_tf2 and manipulator demos |
| README.md | Updates demo section with structured table showcasing turtle_tf2 and manipulator demos |
| electron_demo/manipulator/start-demo.sh | Bash script for convenient ROS2 environment setup and demo launch |
| electron_demo/manipulator/package.json | Project configuration with dependencies for Electron, rclnodejs, and Three.js |
| electron_demo/manipulator/main.js | Electron main process handling ROS2 integration, joint state publishing, and animation control |
| electron_demo/manipulator/renderer.js | Three.js visualization with 3D manipulator model, UI controls, and real-time updates |
| electron_demo/manipulator/index.html | Application UI layout with control panels, status displays, and embedded Three.js |
| electron_demo/manipulator/README.md | Comprehensive documentation covering installation, usage, architecture, and troubleshooting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| source /home/minggang/Download/ros2-linux/setup.bash | ||
|
|
There was a problem hiding this comment.
The hardcoded path /home/minggang/Download/ros2-linux/setup.bash is user-specific and will not work for other users. Consider using a more generic approach like checking common ROS2 installation paths or requiring users to set an environment variable.
| source /home/minggang/Download/ros2-linux/setup.bash | |
| # Try to source ROS2 setup.bash from environment variable or common locations | |
| if [ -n "$ROS2_SETUP" ] && [ -f "$ROS2_SETUP" ]; then | |
| source "$ROS2_SETUP" | |
| elif [ -f "/opt/ros/$ROS_DISTRO/setup.bash" ]; then | |
| source "/opt/ros/$ROS_DISTRO/setup.bash" | |
| elif [ -f "/opt/ros/foxy/setup.bash" ]; then | |
| source "/opt/ros/foxy/setup.bash" | |
| elif [ -f "/opt/ros/humble/setup.bash" ]; then | |
| source "/opt/ros/humble/setup.bash" | |
| elif [ -f "/opt/ros/galactic/setup.bash" ]; then | |
| source "/opt/ros/galactic/setup.bash" | |
| else | |
| echo "❌ Could not find ROS2 setup.bash. Please set the ROS2_SETUP environment variable to the correct path." | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 10 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This PR adds a comprehensive manipulator demo to the Electron examples, showcasing a two-joint robotic arm visualization using rclnodejs and Three.js. The demo provides interactive control through sliders, automatic animation modes, and real-time ROS2 integration. Key changes: - Adds a complete Two-Joint Manipulator demo application with 3D visualization - Updates README documentation to feature both turtle_tf2 and manipulator demos in a structured table format - Implements ROS2 joint state publishing/subscribing with visual feedback Fix: #1263
This PR adds a comprehensive manipulator demo to the Electron examples, showcasing a two-joint robotic arm visualization using rclnodejs and Three.js. The demo provides interactive control through sliders, automatic animation modes, and real-time ROS2 integration.
Key changes:
Fix: #1263