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

praskot's profile - activity

2022-07-28 02:08:52 -0500 received badge  Good Answer (source)
2022-07-28 02:08:52 -0500 received badge  Enlightened (source)
2022-04-01 16:08:23 -0500 received badge  Famous Question (source)
2022-03-28 17:03:39 -0500 received badge  Famous Question (source)
2022-03-24 03:10:08 -0500 received badge  Nice Answer (source)
2022-03-18 12:53:38 -0500 commented question Can i use linear acc from imu for robot position?

use the linear acceleration data from imu for the position I assume you mean integrating just the acceleration rea

2021-07-26 18:34:48 -0500 asked a question Auto generation of ros messages: Cmaklists add_message_files not detecting variable

Auto generation of ros messages: Cmaklists add_message_files not detecting variable Hi, I'm autogenerating ros-messages

2021-07-04 02:02:16 -0500 received badge  Popular Question (source)
2021-07-04 02:02:16 -0500 received badge  Notable Question (source)
2021-05-13 02:24:51 -0500 commented answer unable to build the package using catkin build

Not sure, sorry.

2021-05-12 07:21:10 -0500 marked best answer ros nodes vs ros timers?

Hi,

I'm would like to set up two loops at different frequencies on a system (like raspberry pi3). I'm trying to decide the optimal way to set up my code with the least latency in data transfer between the two loops and least computation. Here are two options I thought of,

  1. Two different ros-nodes each with different loop rates and using ros-msgs to communicate between these loops. -With the ros-nodes options, the loop rates are pretty consistent but there is latency in the data transfer.

  2. A class with two functions run at different loop rates using ros::Timers. Class variables used to transfer the data between the functions. -Using the ros::Timers, even though no latency in the data transfer, loop rates are not quite consistent.

What is the better option, or are there any other better options? Is multi-threading a better option?

Also, it is possible to share data between two ros-nodes without using rosmsgs/rosservice but by sharing variables/pointers between them?

Thank you - prasanth

2021-05-12 02:35:40 -0500 answered a question unable to build the package using catkin build

Hi, the problem is it not with your CMakeLists; it's from the navigation package! If you look at catkin_package (here)

2021-05-08 05:23:50 -0500 commented question unable to build the package using catkin build

This is a C++ error, not really a ros issue. Have you included the move_base header file and linked it to the executable

2021-05-08 05:19:29 -0500 asked a question Publishing, multiple small topics vs one large topic, at the same rate

Publishing, multiple small topics vs one large topic, at the same rate I'm trying to understand if there is any computat

2021-03-21 22:20:40 -0500 received badge  Notable Question (source)
2021-03-21 22:20:40 -0500 received badge  Popular Question (source)
2021-03-18 10:22:18 -0500 received badge  Famous Question (source)
2021-03-14 23:47:26 -0500 received badge  Famous Question (source)
2021-02-19 17:19:15 -0500 commented answer Nodelet crashes when using pcl::VoxelGrid<pcl::PointXYZ>, pcl::SACSegmentation<pcl::PointXYZ>

Yeah, I just removed the line find_package(PCL 1.2 REQUIRED) and it worked for me. Are you facing the exact same error?

2021-02-19 03:55:15 -0500 received badge  Famous Question (source)
2020-12-25 21:21:49 -0500 received badge  Notable Question (source)
2020-12-15 02:44:58 -0500 edited answer Links disconnect in (custom) spherical joint in urdf.xacro

Based on the accepted answer here, these two options helped, Reducing the time_step from 0.001 to 0.0001 (obviously th

2020-12-15 02:43:43 -0500 answered a question Links disconnect in (custom) spherical joint in urdf.xacro

Based on the accepted answer here, these two options helped, Reducing the step time from 0.001 to 0.0001 (obviously th

2020-12-08 03:59:45 -0500 received badge  Organizer (source)
2020-12-08 03:51:06 -0500 asked a question Links disconnect in (custom) spherical joint in urdf.xacro

Links disconnect in (custom) spherical joint in urdf.xacro Created a custom spherical joint using dummy links to simulat

2020-11-17 22:01:59 -0500 commented question package installation

sudo apt-get install ros-neotic-robot-localization Usually, I do sudo apt-get install ros-neotic-robot and then search

2020-11-17 22:01:47 -0500 commented question package installation

sudo apt-get install ros-neotic-robot-localization Usually, I do sudo apt-get install ros-neotic-robot and then search

2020-11-17 22:01:37 -0500 commented question package installation

sudo apt-get install ros-neotic-robot-localization Usually, I do sudo apt-get install ros-neotic-robot and then search

2020-11-16 02:35:57 -0500 received badge  Popular Question (source)
2020-11-13 12:54:22 -0500 marked best answer how to add image to model.urdf.xacro

I'm trying to add an arcuo-marker (*.png file) to a simple model (box) in urdf. I realize there are quite a few posts related to this but I couldn't make them work for me. Can anyone point me in the right direction? Thank you

<?xml version="1.0"?>
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">

    <xacro:property name="PI" value="3.1415926535897931"/>
    <xacro:property name="mass" value="1" />
    <xacro:property name="length" value="1." />
    <xacro:property name="width" value="0.5" />
    <xacro:property name="height" value="0.2" />

    <!-- Base Link -->
    <link name="box">
        <collision>
            <origin xyz="0 0 ${height/2}" rpy="0 0 0"/>
            <geometry>
                <box size="${length} ${width} ${height}"/>
            </geometry>
        </collision>
        <visual>
            <origin xyz="0 0 ${height/2}" rpy="0 0 0"/>
            <geometry>
                <box size="${length} ${width} ${height}"/>
            </geometry>
            <material name="red"/>
        </visual>
        <inertial>
            <origin xyz="0 0 ${height/2}" rpy="0 0 0"/>
            <mass value="${mass}"/>
            <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.4"/>
        </inertial>
    </link>
    <gazebo reference="box">
            <material>YourMaterialName</material>  <!-- how should i include an image here -->
    </gazebo>
</robot>
2020-11-12 19:42:14 -0500 edited question how to add image to model.urdf.xacro

how to add image to model.urdf.xacro I'm trying to add an arcuo-marker (*.png file) to a simple model (box) in urdf. I r

2020-11-12 19:41:46 -0500 asked a question how to add image to model.urdf.xacro

how to add image to model.urdf.xacro I'm trying to add an arcuo-marker (*.png file) to a simple model (box) in urdf. I r

2020-11-12 18:51:06 -0500 commented answer Questions to SDF, urdf, xacro, material, textures using Gazebo

where should the media folder be located?

2020-11-12 18:50:28 -0500 commented answer Questions to SDF, urdf, xacro, material, textures using Gazebo

is /media/materials/scripts/ absolute path?

2020-10-19 23:15:51 -0500 commented question How does one assign values to messages with arrays in C++

I believe, one brute force method is, for (int i = 0; i<height*width; i++) { debMap.data.pushback(vi[i]); } I'm

2020-10-19 23:15:29 -0500 commented question How does one assign values to messages with arrays in C++

I believe, one brute force method is, for (int i = 0; i<height*width; i++) { debMap.data.pushback(vi[i]); } I'm

2020-09-24 15:08:09 -0500 received badge  Notable Question (source)
2020-09-22 12:32:40 -0500 marked best answer Nodelet crashes when using pcl::VoxelGrid<pcl::PointXYZ>, pcl::SACSegmentation<pcl::PointXYZ>

Goal: Trying to detect and publish all the detected planes (coefficients) from a depth image.

Using depth_image_proc to compute the point-cloud. Created a similar segmentation nodelet, attached below. Test script works fine, where I just publish the cloud height. But, when I include pcl::VoxelGrid<pcl::PointXYZ> vg, pcl::SACSegmentation<pcl::PointXYZ> seg Nodelet crashes at run time (compiles without issues) with the following error.

[ERROR] [1597300025.991310390]: Failed to load nodelet [/pcl_segmentation] of type [using_image_pipeline/pcl_segmentation] even after refreshing the cache: MultiLibraryClassLoader: Could not create object of class type using_image_pipeline::PclSegmentationNodelet as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ERROR] [1597300025.991394042]: The error before refreshing the cache was: Failed to load library /home/kotaru/catkin_ws/devel/lib//libusing_image_pipeline.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/kotaru/catkin_ws/devel/lib//libusing_image_pipeline.so: undefined symbol: _ZN3pcl7PCLBaseINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS1_EEEE)
[FATAL] [1597300025.991807722]: Failed to load nodelet '/pcl_segmentation` of type `using_image_pipeline/pcl_segmentation` to manager `using_image_pipeline_nodelet'
[pcl_segmentation-4] process has died [pid 12564, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load using_image_pipeline/pcl_segmentation using_image_pipeline_nodelet __name:=pcl_segmentation __log:=/home/kotaru/.ros/log/00c8aa44-dd2e-11ea-aa9d-54bf64375ec6/pcl_segmentation-4.log].
log file: /home/kotaru/.ros/log/00c8aa44-dd2e-11ea-aa9d-54bf64375ec6/pcl_segmentation-4*.log

Can't seem to understand why that is happening, or if the implementation is wrong.


Plane segmentation nodelet source code,

#include <image_transport/image_transport.h>
#include <nodelet/nodelet.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/filter.h>
#include <pcl/filters/passthrough.h>
#include <pcl/filters/voxel_grid.h>

#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree.h>
#include <pcl/point_types.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/extract_clusters.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/visualization/pcl_visualizer.h>

#include <pcl_conversions/pcl_conversions.h>
#include <ros/ros.h>
#include <sensor_msgs/point_cloud2_iterator.h>
#include <std_msgs/Float32.h>
#include <std_msgs/Float32MultiArray.h>

#include <boost/thread.hpp>
namespace using_image_pipeline {

class PclSegmentationNodelet : public nodelet::Nodelet {
public:
  ros::NodeHandlePtr nh_ptr_;
  boost::shared_ptr<sensor_msgs::PointCloud2> cloud_;
  boost::mutex connect_mutex_;
  boost::mutex mutex_;

  bool receivedAtLeastOnce = false;
  ros::Subscriber sub_points_;
  ros::Publisher pub_planes_;
  ros::Publisher pub_point_height_;
  std_msgs::Float32MultiArray msg_planes_;

  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_raw, cloud, cloud_f;
  float leaf_size = 0.01; // 10cm 
  pcl::VoxelGrid<pcl::PointXYZ> vg;
  // pcl::SACSegmentation<pcl::PointXYZ> seg;

  PclSegmentationNodelet(/* args */) {
    NODELET_INFO_STREAM("PclSegmentationNodelet constructor");
  }
  ~PclSegmentationNodelet() {}
  virtual void onInit();
  void pointCb(const sensor_msgs::PointCloud2ConstPtr &points_msg);
  void connectCb();
  void planarSegmentation();
};

void PclSegmentationNodelet::onInit() {
  ros::NodeHandle &nh = getNodeHandle();
  nh_ptr_.reset(new ros::NodeHandle(nh));
  // cloud_.reset(new sensor_msgs::PointCloud2(nh));

  NODELET_INFO_STREAM("Initialising nodelet... [PclSegmentationNodelet]");
  ros::SubscriberStatusCallback connect_cb = boost::bind(&PclSegmentationNodelet::connectCb, this);
  boost::lock_guard<boost::mutex> lock(connect_mutex_);
  pub_planes_ = nh_ptr_->advertise<std_msgs::Float32MultiArray>("planes", 3, connect_cb, connect_cb);
  pub_point_height_ = nh_ptr_->advertise<std_msgs::Float32>("test_msg", 3, connect_cb, connect_cb);

  cloud_raw.reset(new pcl::PointCloud<pcl::PointXYZ>);
  cloud.reset(new pcl::PointCloud<pcl::PointXYZ>);
}

void PclSegmentationNodelet::connectCb() {
  boost::lock_guard<boost::mutex> lock(connect_mutex_);
  sub_points_ = nh_ptr_->subscribe("points", 3, &PclSegmentationNodelet::pointCb, this);
}

void PclSegmentationNodelet::pointCb(const sensor_msgs::PointCloud2ConstPtr ...
(more)
2020-09-22 12:32:40 -0500 received badge  Self-Learner (source)
2020-09-02 03:26:04 -0500 received badge  Notable Question (source)
2020-08-26 00:36:32 -0500 commented answer Why there is a linear_acceleration in X direction for non moving imu 9250?

Find the rest-state orientation (say q0), and rotate the accelerometer reading by that amount. accel_corrected = q0*a

2020-08-26 00:35:46 -0500 commented answer Why there is a linear_acceleration in X direction for non moving imu 9250?

Find the rest-state orientation (say q0), and rotate the accelerometer reading by that amount. accel_corrected = q0*a

2020-08-26 00:04:08 -0500 received badge  Nice Answer (source)
2020-08-25 15:48:54 -0500 edited answer Why there is a linear_acceleration in X direction for non moving imu 9250?

If you see the norm of the linear_acceleration, norm(x: 1.93930334473, y: 0.0191536132812, z: 9.28710823975) = 9.4874,