ZED , 一个社会化编程工具 editor

Zed 编辑器 macOS 构建指南

https://github.com/zed-industries/zed

Building Zed for macOS

Repository

Clone down the Zed repository.

Dependencies

  • Install rustup

  • Install Xcode from the macOS App Store, or from the Apple Developer website. Note this requires a developer account.

Ensure you launch Xcode after installing, and install the macOS components, which is the default option.

  • Install Xcode command line tools

    xcode-select --install
  • Ensure that the Xcode command line tools are using your newly installed copy of Xcode:

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -license accept
  • Install cmake (required by a dependency)

    brew install cmake

Backend Dependencies (optional) {#backend-dependencies}

If you are looking to develop Zed collaboration features using a local collaboration server, please see: Local Collaboration docs.

Building Zed from Source

Once you have the dependencies installed, you can build Zed using Cargo.

For a debug build:

cargo run

For a release build:

cargo run --release

And to run the tests:

cargo test --workspace

Troubleshooting

Error compiling metal shaders

error: failed to run custom build command for gpui v0.1.0 (/Users/path/to/zed)`**

xcrun: error: unable to find utility "metal", not a developer tool or in PATH

Try sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

If you're on macOS 26, try xcodebuild -downloadComponent MetalToolchain

Cargo errors claiming that a dependency is using unstable features

Try cargo clean and cargo build.

https://zed.dev/

下载

https://zed.dev/download

### 关于ZED深度图可视化的方法与工具 对于ZED深度图的可视化需求,可以借助官方提供的工具和示例来完成。以下是几种常见的实现方式及其对应的工具: #### 使用ZED Sensor Viewer ZED Sensor Viewer 是一款由 Stereolabs 官方提供的一款图形界面工具,能够实时显示 ZED 摄像头捕获的数据,包括深度图、点云和其他传感器信息[^3]。如果遇到无法正常显示的情况,建议检查摄像头驱动版本以及软件配置是否正确。 #### 利用ZED ROS Wrapper中的Visualization功能 通过 `zed-ros-wrapper` 提供的功能模块,可以直接在ROS环境中获取并渲染深度图数据。具体来说,在 `zed-ros-examples` 中包含了多个示例节点,其中涉及到了深度图的发布与订阅过程[^4]。开发者可以通过修改这些示例代码来自定义可视化逻辑。 例如,下面是一个简单的 Python 节点程序,用于订阅 `/depth/depth_registered` 主题并将接收到的深度图像保存为本地文件: ```python import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import cv2 def depth_callback(data): bridge = CvBridge() try: # 将 ROS 图像消息转换成 OpenCV 格式的数组 cv_image = bridge.imgmsg_to_cv2(data, desired_encoding="passthrough") # 显示或存储深度图 cv2.imwrite('depth_map.png', cv_image) print("Depth map saved successfully.") except CvBridgeError as e: print(e) if __name__ == '__main__': rospy.init_node('depth_subscriber') rospy.Subscriber("/zed2i/zed_node/depth/depth_registered", Image, depth_callback) rospy.spin() ``` 此脚本会监听指定话题上的深度帧更新事件,并调用回调函数处理每一帧的内容。最终生成一张名为 `depth_map.png` 的PNG格式图片文件存放在当前工作目录下。 另外需要注意的是,为了能够在 RViz 中直观查看三维空间分布情况下的距离数值变化趋势,还可以安装额外插件如 rviz-plugin-zed-od 来增强交互体验效果[^2]。 ### 总结 综上所述,无论是采用独立运行的应用还是嵌入现有框架内部的方式都可以满足基本的需求;而对于更高级别的定制化要求,则推荐深入研究相关 API 文档资料进一步探索可能性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值