Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M8 lidar #5

Open
sab3rclaw1 opened this issue Jul 25, 2019 · 19 comments
Open

M8 lidar #5

sab3rclaw1 opened this issue Jul 25, 2019 · 19 comments

Comments

@sab3rclaw1
Copy link

Screenshot from 2019-07-25 11-44-57

Hey I was able to get the display by changing topic name.
Now how do I get person tracking working. Seems when I try to check rostopic for filtered and clustered topics they are not publishing anything.
Guide me where am I going wrong.
I am initializing m8 lidar using Quanergy_client_ros. Is that a problem? or do I have any other option.
@MyNameIsCosmo

@MyNameIsCosmo
Copy link
Owner

Try adjusting the values in the Dynamic Reconfigure starting with the filtered cloud and cluster sizes.

Also check the output of the lidar_body_tracking node in your terminal. You may need to pass --screen to the end of your roslaunch command.

@sab3rclaw1
Copy link
Author

Hey I know I am not helping you much with this info but I am new with ROS and trying to figure out what I am doing wrong. Please guide me through this. This image shows 2 files that needs frame id change and 2 terminals with roslaunch and rostopic. For some reasone QP308 is still displaying and there is still no data in filtered or clustered nodes.
new

Can you please walk me through this. I would be really thankful

@MyNameIsCosmo
Copy link
Owner

MyNameIsCosmo commented Jul 26, 2019

In the lidar_body_tracking.launch (top-left) try changing scan_topic to /QP308/pc_QP308

/QP308/pc_QP308 is the Point Cloud topic published by the Quanergy Lidar driver.

Welcome to ROS!

@sab3rclaw1
Copy link
Author

Yup in my case it is Sensor/points

@MyNameIsCosmo
Copy link
Owner

Can you do a rostopic info on both:

  • /QP308/pc_QP308
  • /Sensor/points

@sab3rclaw1
Copy link
Author

Screenshot from 2019-07-26 09-17-23
left bottom is rostopic list after running Quanergy ros driver only and right bottom is after running lidar_body_tracking roslaunch

So I believe QP308 is coming from roslaunch. Please check following screenshots. Left side is /Sensor/topics and right side is /QP308
report

@sab3rclaw1
Copy link
Author

Again I am sorry for troubling you so much

@MyNameIsCosmo
Copy link
Owner

The frame_id in the topic is set to Sensor.
The URDF robot_name should be set to the same frame_id as the topic:
https://github.com/MyNameIsCosmo/lidar_body_tracking/blob/master/urdf/m8.urdf.xacro#L2

Try changing name="sensor_m8" to name="Sensor"

@sab3rclaw1
Copy link
Author

do I change macro name as well? ( <xacro:macro name="sensor_m8">)

@MyNameIsCosmo
Copy link
Owner

Nah, the macro name is irrelevant to this issue.

In fact, the macro is redundant for the Xacro file and is confusing, but that's an issue for a later date.

@sab3rclaw1
Copy link
Author

new1
Well something silly mistake is been getting on for sure/

@MyNameIsCosmo
Copy link
Owner

I derped

The actual value you need to change in the urdf is the link:
https://github.com/MyNameIsCosmo/lidar_body_tracking/blob/master/urdf/m8.urdf.xacro#L8-L10

      <child link="Sensor"/>
    </joint>
    <link name="Sensor">

@sab3rclaw1
Copy link
Author

<?xml version="3.0"?> <robot name="Sensor" xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:macro name="sensor_m8"> <link name="base_link"/> <joint name="m8_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 0"/> <parent link="base_link"/> <child link="Sensor"/> </joint> <link name="Sensor"> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <cylinder length="0.0876" radius="0.10315"/> </geometry> <material name="dark_grey"> <color rgba="0.3 0.3 0.3 1"/> </material> </visual> </link> </xacro:macro> <sensor_m8/> </robot>

@sab3rclaw1
Copy link
Author

I did changed it to Sensor much before

@sab3rclaw1
Copy link
Author

Can it be possible that it height might be the reason? I can try placing it higher if needed

@MyNameIsCosmo
Copy link
Owner

Height shouldn't be a reason since height should remain independent of the data.

Try putting some debug info like ROS_INFO('cloud_cb') into the cloud_cb function, and work your way from there.

Few things to check are:

  • frame_id of your sensor topics (use rostopic echo -n1 /Sensor/points/header/frame_id)
  • link in the urdf is the same as the frame_id
  • there is a pointcloud from the sensor and the dynamic reconfigure settings seem reasonable (you may have to play with cluster sizing, but the defaults worked for the m8 I had)
  • There are no clashing roslaunch files (rospack find lidar_body_tracking should bring up the current catkin workspace you're working with)

@sab3rclaw1
Copy link
Author

Okay. Just one more thing before I do debugging. What should be the output for pcl_clustered and pcl_filtered when you do rostopic echo pcl_clustered/filtered

@MyNameIsCosmo
Copy link
Owner

They should look like the same pointcloud message from Sensor/points except with less data

@sab3rclaw1
Copy link
Author

Alrighty. Let me give it a try and see if anything works for me. I will ping you with result once I am done.
Thanks once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants