NVIDIA-AI-IOT / husky_demo

Husky Simulation and Hardware In the Loop simulation on Isaac SIM with Isaac ROS
https://developer.nvidia.com/blog/simulate-and-localize-a-husky-robot-with-nvidia-isaac/
MIT License
11 stars 1 forks source link

Incorrect Mesh Path in husky_isaac_sim.py causing Launch Error #4

Open mashikolort opened 4 months ago

mashikolort commented 4 months ago

Issue

After Isaac Sim is launched, the environment is loaded, and the terminal where Isaac Sim is running prints "Robot Loader Start," we run the following command, which should launch rviz and load Husky on Isaac Sim: run ros2 launch husky_isaac_sim robot_display.launch.py

As a result, rviz launches and Husky robot is loaded in Isaac Sim, but it is not visible and doesn't contain meshes.

Cause

The husky_isaac_sim.py script, used in ./husky_demo.sh, which contains RobotLoader Class defines incorrect paths for the mesh locations on lines 160-161 of the callback_description function. The script assumes the meshes are located directly under share.

  1. isaac_ros/install/share/husky_description/meshes (incorrect)
  2. isaac_ros/install/share/husky_isaac_sim/meshes (incorrect)

These paths should have been:

  1. isaac_ros/install/husky_description/share/husky_description/meshes (correct)
  2. isaac_ros/install/husky_isaac_sim/share/husky_isaac_sim/meshes (correct)

Solution

The issue was resolved by updating the husky_isaac_sim.py script on lines 160-161 within the callback_description function. The updated code snippet is shown below:

`
else: print("Running from Workstation")

Get the current working directory

        path_meshes = os.path.join(os.getcwd(), "isaac_ros", "install", "husky_description", "share", "husky_description", "meshes")
        path_mesh_accessories = os.path.join(os.getcwd(), "isaac_ros", "install", "husky_isaac_sim", "share", "husky_isaac_sim", "meshes")

` This ensures the script searches for meshes in the expected locations within the package structure. When running