ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Yogi_4's profile - activity

2018-01-16 17:24:04 -0500 commented question Servo control arduino

What is the issue? @lagankapoor

2017-12-02 17:10:46 -0500 received badge  Famous Question (source)
2017-11-18 15:29:45 -0500 received badge  Famous Question (source)
2017-10-12 08:02:47 -0500 asked a question how to overlap rgb image and point cloud

how to overlap rgb image and point cloud i have a image and 3D point cloud obtained from hokuyo camera. How can i overla

2017-10-12 06:00:43 -0500 edited question point cloud to depth image

point cloud processing how to achieve this given point cloud data and image.

2017-10-11 16:38:24 -0500 received badge  Notable Question (source)
2017-10-11 07:11:44 -0500 commented question point cloud to depth image

do i need to convert the image to any format ? and how can i know the resolution of my 3D point cloud. I'm getting heigh

2017-10-11 07:11:04 -0500 received badge  Commentator
2017-10-11 07:11:04 -0500 commented question point cloud to depth image

do i need to convert the image to any format ? and how can i know the resolution of my 3D point cloud. I'm getting heigh

2017-10-11 04:29:15 -0500 edited question point cloud to depth image

point cloud processing how to achieve this given point cloud data and image.

2017-10-11 04:28:25 -0500 edited question point cloud to depth image

adding rgb value of a pixel from an image to each point in point cloud I have a hokuyo laser scanner and able to publish

2017-10-10 05:49:41 -0500 received badge  Popular Question (source)
2017-10-10 02:35:24 -0500 edited question point cloud to depth image

how to add rgb value of a pixel from an image to each point in point cloud I have a hokuyo laser scanner and able to pub

2017-10-05 07:15:37 -0500 asked a question point cloud to depth image

how to add rgb value of a pixel from an image to each point in point cloud I have a hokuyo laser scanner and able to pub

2017-09-23 09:53:25 -0500 received badge  Student (source)
2017-09-08 03:51:45 -0500 commented answer 3D point cloud

Yeah the problem is solved

2017-09-01 23:55:38 -0500 marked best answer 3D point cloud

pcl_assembler_client.py

 #!/usr/bin/env python
import rospy
from laser_assembler.srv import AssembleScans2
from sensor_msgs.msg import PointCloud2

rospy.init_node("assemble_scans_to_cloud")
rospy.wait_for_service("assemble_scans2")
assemble_scans=rospy.ServiceProxy('assemble_scans2',AssembleScans2)
pub=rospy.Publisher("/point_Cloud",PointCloud2,queue_size=2)
r=rospy.Rate(10)
while True:
        try:
                resp=assemble_scans(rospy.Time(0,0),rospy.get_rostime())
                print "Got cloud with %u points" % len(resp.cloud.data)
                pub.publish(resp.cloud)
        except rospy.ServiceException, e:
                print "service call failed: %s" %e
        r.sleep()

scan_to_pcl.py

#!/usr/bin/env python

import rospy
from sensor_msgs.msg import PointCloud2 as pc2
from sensor_msgs.msg import LaserScan
from laser_geometry import LaserProjection

class Laser2PC():
        def __init__(self):
                self.laserProj=LaserProjection()
                self.pcPub=rospy.Publisher("/laserPointCloud",pc2,queue_size=1)
                self.laserSub=rospy.Subscriber("/scan",LaserScan,self.laserCallback)

        def laserCallback(self,data):
                cloud_out=self.laserProj.projectLaser(data)
                self.pcPub.publish(cloud_out)
if __name__=='__main__':
        rospy.init_node("scan_to_pcl")
        l2pc=Laser2PC()
        rospy.spin()

my launch file is,

<launch>

<node name="scan_to_pcl" pkg="cloud_data" type="scan_to_pcl.py"/>

<node type="point_cloud2_assembler" pkg="laser_assembler"  name="pcl_assembler_server">
<remap from="cloud" to="laserPointCloud"/>
<param name="max_clouds" type="int" value="400" />
<param name="fixed_frame" type="string" value="base_link" />
</node>


<node name="pcl_assembler_client" pkg="cloud_data" type="pcl_assembler_client.py" output="screen"/>

</launch>

These is code i'm using to generate point cloud data using the laser_assembler package but it is not extruded along the third axis i.e it is not 3D. Can someone help me out on how to achieve 3D cloud.

2017-09-01 07:02:40 -0500 received badge  Notable Question (source)
2017-09-01 00:15:24 -0500 marked best answer Servo control arduino

I want to control a servo attached to arduino by subscribing to /joint_states topic so that when the change the slider position the servo moves accordingly. I tried with the following code but the servo doesn't change its position when i change the slider position on rviz. The led on Arduino blinks as written in the callback function but the servo isn't moving.

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include <WProgram.h>
#endif

#include <Servo.h> 
#include <ros.h>
#include <std_msgs/UInt16.h>
#include <sensor_msgs/JointState.h>

ros::NodeHandle  nh;
Servo servo;

double ang=0;

void servo_cb( const sensor_msgs::JointState& cmd_msg){
  ang=radiansToDegrees(cmd_msg.position[0]);
  servo.write(ang); //set servo angle, should be from 0-180  
  digitalWrite(13, HIGH-digitalRead(13));  //toggle led  
}


ros::Subscriber<sensor_msgs::JointState> sub("joint_states", servo_cb);

void setup(){
  pinMode(13, OUTPUT);
  nh.getHardware()->setBaud(115200);
  nh.initNode();
  nh.subscribe(sub);

  servo.attach(9); //attach it to pin 9
}

void loop(){
  nh.spinOnce();
}

double radiansToDegrees(float position_radians)
{

  position_radians = position_radians + 1.6;

  return position_radians * 57.2958;

}
2017-09-01 00:15:13 -0500 answered a question Servo control arduino

I got it solved issue was with baud rate

2017-08-31 12:16:15 -0500 received badge  Popular Question (source)
2017-08-31 11:43:21 -0500 edited question Servo control arduino

Servo control arduino I want to control a servo attached to arduino by subscribing to /joint_states topic so that when t

2017-08-31 02:40:20 -0500 asked a question Servo control arduino

Servo control arduino I want to control a servo attached to arduino by subscribing to /joint_states topic so that when t

2017-08-30 00:46:55 -0500 commented answer 3D point cloud

i have uploaded the code #jayess

2017-08-30 00:46:39 -0500 commented answer 3D point cloud

i have uploaded the code

2017-08-29 09:51:18 -0500 received badge  Famous Question (source)
2017-08-29 05:23:41 -0500 edited question 3D point cloud

3D point cloud pcl_assembler_client.py #!/usr/bin/env python import rospy from laser_assembler.srv import AssembleScan

2017-08-29 03:10:52 -0500 edited question 3D point cloud

3D point cloud pcl_assembler_client.py #!/usr/bin/env python import rospy from laser_assembler.srv import AssembleScan

2017-08-29 02:22:52 -0500 commented question how to get h*w point cloud from laser scan not just planer

did u solve this.I'm stuck with the same

2017-08-29 01:42:14 -0500 received badge  Associate Editor (source)
2017-08-29 01:42:14 -0500 edited question 3D point cloud

3D point cloud !/usr/bin/env python import rospy from laser_assembler.srv import AssembleScans2 from sensor_msgs.msg im

2017-08-29 01:37:06 -0500 edited question 3D point cloud

3D point cloud !/usr/bin/env python import rospy from laser_assembler.srv import AssembleScans2 from sensor_msgs.msg im

2017-08-29 01:35:02 -0500 edited question 3D point cloud

3D point cloud !/usr/bin/env python import rospy from laser_assembler.srv import AssembleScans2 from sensor_msgs.msg im

2017-08-29 01:33:29 -0500 edited question 3D point cloud

3D point cloud !/usr/bin/env python import rospy from laser_assembler.srv import AssembleScans2 from sensor_msgs.msg im

2017-08-29 01:33:07 -0500 edited question 3D point cloud

3D point cloud I generated point cloud using the laser_assembler but it is not extruded along the third axis i.e it is n

2017-08-29 01:32:53 -0500 edited question 3D point cloud

3D point cloud I generated point cloud using the laser_assembler but it is not extruded along the third axis i.e it is n

2017-08-29 01:32:34 -0500 edited question 3D point cloud

3D point cloud I generated point cloud using the laser_assembler but it is not extruded along the third axis i.e it is n

2017-08-29 01:32:23 -0500 edited question 3D point cloud

3D point cloud I generated point cloud using the laser_assembler but it is not extruded along the third axis i.e it is n

2017-08-29 01:29:42 -0500 edited question 3D point cloud

Python implementation of transformLaserScanToPointCloud() I generated point cloud using the laser_assembler but it is no

2017-08-29 01:29:31 -0500 edited question 3D point cloud

Python implementation of transformLaserScanToPointCloud() I generated point cloud using the laser_assembler but it is no

2017-08-28 09:31:54 -0500 commented answer 3D point cloud

I have used projectlaser() function but i didn't get 3D cloud.I'm getting data published on pointcloud2 and i can also v

2017-08-28 09:30:31 -0500 commented answer 3D point cloud

I have used projectlaser() function but i didn't get 3D cloud.

2017-08-28 08:36:48 -0500 asked a question 3D point cloud

3D point cloud I generated point cloud using the laser_assembler but it is not extruded along the third axis i.e it is n