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

cheour's profile - activity

2015-07-26 16:00:15 -0500 received badge  Famous Question (source)
2013-07-25 19:44:29 -0500 received badge  Famous Question (source)
2013-06-18 17:45:55 -0500 received badge  Notable Question (source)
2013-05-08 01:46:41 -0500 received badge  Popular Question (source)
2013-04-28 22:41:16 -0500 asked a question Hokuyo Node Frame ID problem for Slam

Hello,

I'm trying to do slam with hector_mapping. I have setted up all the necessary steps. All the transforms have been made. But when I run the rviz it seems there is no transform between base_link and laser. But actually it is published with static transform publisher and I confirmed that with tf_monitor.

When I run tf_monitor for base_link and laser, under laser it says "NO PARENT". These brings to my mind if there is problem with hokuyo_node. When I look at it, it seems ok and frame_id is setted to laser.

I really get confused with that. Any helps appreciated.

2013-04-26 11:13:04 -0500 received badge  Famous Question (source)
2013-03-06 12:36:15 -0500 received badge  Notable Question (source)
2013-03-06 12:36:15 -0500 received badge  Popular Question (source)
2012-11-24 14:09:10 -0500 received badge  Popular Question (source)
2012-11-24 14:09:10 -0500 received badge  Notable Question (source)
2012-10-19 02:19:04 -0500 received badge  Scholar (source)
2012-10-19 02:17:12 -0500 commented question C++ & Serial Read Problem

I solved it! Well it looks like I did not familiar with const function parameter. I set function parameters to constant parameters like myFunction(const uint8[] msg) so it is working great now.

2012-10-19 02:17:12 -0500 commented question C++ & Serial Read Problem

I solved it! Well it

2012-10-19 02:16:20 -0500 received badge  Popular Question (source)
2012-10-19 02:16:20 -0500 received badge  Famous Question (source)
2012-10-19 02:16:20 -0500 received badge  Notable Question (source)
2012-10-19 01:26:18 -0500 asked a question Compressed image transfer syntax

Hi,

I have a point grey chamelon ieeee1394 camera. I'm able to get the images with camera1394 node through image_transport method. I'm taking the raw image from /camera/image_color node inside class with standart image_transport subscribe.

 image_transport::ImageTransport it(nh);
 image_transport::Subscriber sub = it.subscribe("camera/image_color", 1, &ImageGate::readImage(), this );

Here readImage(const sensor_msgs::ImageConstPtr& msg) is defined.

But when I try to get the compressed image I did not make it. I tried something like:

image_transport::Subscriber sub = it.subscribe<sensor_msgs::CompressedImage>("camera/image_color", 1, &ImageGate::readImage(), this );

But it didn't work like this. Also I didn't find the way within compressed image tutorial.

Any ideas?

2012-09-05 23:44:40 -0500 asked a question Service Advertice and Class Usage

Hello,

When we try to advertise a service we normally use as shown in ros tutorials:

 ros::ServiceServer service = n.advertiseService("add_two_ints", add);

This is with normal function way.

And if we want to use with class, documentation says use like this:

AddTwo a;
 ros::ServiceServer ss = n.advertiseService("add_two_ints", &AddTwo::add, &a);

Which means we need to initialize an object first.

But suppose I want to use everything related with ros in class and suppose my code is like this:

Comm::Comm()
{
  ros::ServiceServer ss = n.advertiseService("add_two_ints", &write);
  // write() is member of Comm class.
}

In my mind, I should have been use like this, but of course this kind of usage gave me error. Is there any possibility to use service advertise in class as describe. Do I need to initialize the class always?

2012-08-30 16:42:45 -0500 received badge  Popular Question (source)
2012-08-30 16:42:45 -0500 received badge  Notable Question (source)
2012-08-30 16:42:45 -0500 received badge  Famous Question (source)
2012-08-04 16:30:38 -0500 asked a question C++ & Serial Read Problem

Hi,

I'm trying to enhance my skills on ROS with C++. I'm already wrote programs on many languages but since strict C++ architecture is a little bit different for me so that I'm having problems with what I'm trying to.

My aim is to make a communication node that manages serial communication between my mcu and Ubuntu PC. I wrote the communication node in C++ and the simplized version looks like this:

namespace FF
{
  class SerialComm
        {
                public:

                    SerialComm();
                    ~SerialComm();
                    void ManagePackages();
                    void PrintState();
                    bool WriteMotorPackage(FF::MotorDrive::Request &req,
                        FF::MotorDrive::Response &res);

                    ros::NodeHandle         node;

            private:

                    void InitPublishers();
                    void OpenConnection();
                    void SearchPackages();
                    void CatchPackage();
                    void DecodePackage();
                    void PublishFState();
                    void PublishMotorState();

                    float BytesToFloat(unsigned char b0,
                                        unsigned char b1,
                                        unsigned char b2,
                                        unsigned char b3);

                    ros::Publisher          FStatePublisher;
                    ros::Publisher          motorStatePublisher;

                    cereal::CerealPort      device;

                    char                    reply[4096];
                    std::vector<unsigned char>      validData;
                    int                     dataSize;

        struct Motors
        {
          unsigned char _1;
          unsigned char _2;
        };

        struct FState_
        {
          char errors;
                      int distance
        };

                   FState_  FState;
           Motors   FMotors;

    };

};

What this code doing is First open a serial connection and then in each while cycle to read the serial port with SearchPackages and CatchPackages, finally decode package with DecodePackages function. After package decode I'm using Publish functions. What I do is write the values to FMotors variable like FMotors._1 = incomingData and then publish it with a ROS publisher.

But the problem occurs here. First time it reads the value and write it to variables and publish it. And I can see it from the topic echo. But after first read it never updates the variables. Topic Variables always have the value of the first read. But I'm sure there is no problem with reading and catching true values from serial port. Problem is updating the variables. Maybe because of I'm not very familiar with pointer and static concepts in C++ object style. Whatever it is your ideas and helps will be very useful to solve this. problem.

2012-05-09 16:25:46 -0500 answered a question Creating flight joystick node with libusb

Well after a while go on with problem I managed it with rosdep.yaml. For libusb in rosdep.yaml I should have something like:

libusb:

ubuntu: libusb-dev

But this is not enough. I should have also set the true linker for compile. So I went to CMakeLists.txt and add

target_link_libraries(joystick_talker usb-1.0) // joystick_talker is my node name

and my node started to compile very well with libusb.

With standart joy node, rosdep.yaml created for "joystick" library. But the main problem was here to set it to write permitted directory which is "ros_workspace", after I moved it to ros_workspace and try to rosmake everything gone well.

2012-05-08 13:22:34 -0500 answered a question Creating flight joystick node with libusb

Well it seems like joy package does my job very well anyway. But when I tried to "rosdep install joy" I got the message "Failed to find rosdep joystick for package joy" which means it couldn't find the joystick library in the operating system.

But I'm 100% sure that I have joystick library as I have libusb-dev. Both I have in operating system but rosdep is not able to find libraries. My idea is something should go with CMakeLists.txt because it seems cmake does not include these libraries. But I'm not yet experienced to solve that deeply. According to tutorials I could have easily write "rosdep install joy" and everything should have gone well, but it is not.

2012-05-08 13:22:20 -0500 answered a question Creating flight joystick node with libusb

Well it seems like joy package does my job very well anyway. But when I tried to "rosdep install joy" I got the message "Failed to find rosdep joystick for package joy" which means it couldn't find the joystick library in the operating system.

But I'm 100% sure that I have joystick library as I have libusb-dev. Both I have in operating system but rosdep is not able to find libraries. My idea is something should go with CMakeLists.txt because it seems cmake does not include these libraries. But I'm not yet experienced to solve that deeply. According to tutorials I could have easily write "rosdep install joy" and everything should have gone well, but it is not.

2012-05-08 04:49:13 -0500 asked a question Creating flight joystick node with libusb

I'm trying to get standart usb hid joystick values. Actually I already get the data through libusb and standart C compiler in Eclipse (linux platform). But I wanted to integrate it to ROS and make it a node(joystick_publisher). But I failed.

When I try to merge my existing and working usb code and basic node example in ROS tutorials to create a simple node, I got couple of errors that tells me it didn't realize libusb functions. I already set ros dependency in manifest.xml for libusb-dev but I think rosdep is not able to find it. Rosdep not able to find libusb even in command line.

According to your request I can share the necessery data. If there are other ways to do this job it would be appriciated. Thanks for all helps.