chvmp / robots

Collection of quadrupedal robots configured to work in CHAMP development framework
224 stars 68 forks source link

How to use my own laser? #4

Open Jingjinganhao opened 3 years ago

Jingjinganhao commented 3 years ago

Hi, I want to use RPLIDAR A3 on mini cheetah, and I change the gazebo parameter of hokuyo in yobotics.urdf, but it doesn't work . How can I use RPLIDAR A3 ?

grassjelly commented 3 years ago

Hi,

The easiest way to do this is to just model RPLIDAR's specifications here https://github.com/HitSZwang/mini-cheetah-gazebo-urdf/blob/7f8ae920903084db6971c3de618cb710d6da8f4d/yobo_model/yobotics_description/xacro/accessories.urdf.xacro#L7-L13 . Otherwise, you can just replace the UTM sensor with RPLidar's xacro tag, just don't forget to define the parent frame and its translation/orientation of the sensor

Jingjinganhao commented 3 years ago

Hi, I set ray_count="10" in accessories.urdf.xacro for testing, but it still doesn't work .

grassjelly commented 3 years ago

sorry forgot to mention you have to regenerate the URDF for every changes you make:

roscd yobotics_description/urdf
./gen_urdf
Jingjinganhao commented 3 years ago

Hi, thank you very much, I did what you said and when I run: roslaunch mini_cheetah_config gazebo.launch that works for me . but I want to use my own world file, and when I change the "gazebo_world" in gazebo.launch, it doesn't work. I still get ray_count="1040"

grassjelly commented 3 years ago

that's strange, because the world file does not contain anything related to your LIDAR. Have you tried the default.world?

Jingjinganhao commented 3 years ago

Which default.world? When I use outdoor.world, it works. When I use my own world file test.world , even I set ray_count="10" in accessories.urdf.xacro and make roscd yobotics_description/urdf ./gen_urdf I also get ray_count="1040"