0
$\begingroup$

Rosanswers logo

I downloded loam_continuous package. Firstly i run the launch file provided in this package. And When i play the bagfiles provided then i am able to see pointcloud in rviz but when i connect my laser with laptop and spins it then nothing comes up in rviz. Can somebody tell me step by step what changes i have to make in that? Regards.

#include <ros/ros.h> #include <tf/transform_broadcaster.h> #include <dynamixel_msgs/JointState.h> #include "sensor_msgs/PointCloud2.h" #include <sensor_msgs/JointState.h>

#include "laser_assembler/AssembleScans.h"

void transform_Callback(const dynamixel_msgs::JointState& msg) { ROS_INFO("broadcasting transform"); }

int main(int argc, char** argv){ ros::init(argc, argv, "tf_broadcaster");

ros::NodeHandle node; ros::Rate rate(30.0); static tf::TransformBroadcaster br; tf::Transform transform; while(ros::ok()) {

transform.setOrigin( tf::Vector3(0.0, 0.0, 0.0) ); tf::Quaternion q; q.setRPY(0, 0, 0); transform.setRotation(q); br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/tilt_laser", "/laser")); ros::Subscriber sub = node.subscribe("/tilt_controller/command", 1000, transform_Callback);

rate.sleep(); ros::spinOnce(); }

return 0; };


Originally posted by ARCHANA on ROS Answers with karma: 3 on 2016-02-01

Post score: 0


Original comments

Comment by Nikka on 2017-07-08:
hi did you complete your project. I am doing the same, i want to create 3D model using hokuyo lidar for that using loam_continuous package. I have sample data with me but it is in sensor_msg/LaserScan form so i have to convert it into Sensor_msg/PointCloude form how do i do it? Thank you

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You cannot just plug your LIDAR into your laptop and use it, as you need to mount it on a motorized slipring that spins it continuously and provides the associated joint angles. You might want to look at some basic tutorials such as Setting up your robot using tf to get a basic idea of how that works.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2016-02-01

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ARCHANA on 2016-02-02:
Can you please suggest me which motor i have to use for creating 3d map using loam package? May be a silly question, can 9 DOF razor imu solve the need of motor? Thanks.

Comment by Stefan Kohlbrecher on 2016-02-02:
No, a IMU can be used to measure inertial parameters (and angles can be estimated from them), but it cannot actuate things. You could in theory manually rotate the LIDAR and measure angles using the IMU but it is highly unlikely that this would work sufficiently well for LOAM.

Comment by ARCHANA on 2016-02-02:
Thanks alot for clearing my doubt. Now will you please tell me which motor should I purchase that supports ROS JADE version?

Comment by Stefan Kohlbrecher on 2016-02-02:
There are infinite possibilities, but one that is pretty straightforward is using a Dynamixel servo (driver here: http://wiki.ros.org/dynamixel_motor)

Here's an example packge for using it with a spinning LIDAR: https://github.com/tu-darmstadt-ros-pkg/hector_multisensor_head_driver

Comment by ARCHANA on 2016-02-02:
Thanks for guiding me. I will work on that as you mentioned.

Comment by ARCHANA on 2016-02-21:
Hi Stefan, can you please tell me in detail what should be the tf tree for providing transform between dynamixel and laser?

Comment by Stefan Kohlbrecher on 2016-02-22:
See the launch files referenced here: https://github.com/tu-darmstadt-ros-pkg/hector_multisensor_head_driver/blob/master/launch/start_standalone_real_hardware_without_asus.launch . This setup is also using Dynamixel servos, so it should be more or less directly applicable.

Comment by ARCHANA on 2016-03-10:
Hi Stefan, i provide a tf_broadcaster between laser and dynamixel motor following this tutorial but was not able to get 3d pointcloud. My tf_broadcaster is provided above. Can you please tell me where i am wrong?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.