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

Robin Hu's profile - activity

2017-05-18 12:29:29 -0500 received badge  Famous Question (source)
2017-02-01 02:29:48 -0500 received badge  Famous Question (source)
2017-01-19 00:56:25 -0500 received badge  Notable Question (source)
2016-11-10 04:57:02 -0500 received badge  Popular Question (source)
2016-11-09 05:16:59 -0500 commented answer How to set start state in moveit except setStartState()

Thank you!I try to setting pose with setJointGroupPositions(). It worked!

2016-11-08 02:36:59 -0500 asked a question How to set start state in moveit except setStartState()

I do not want my robot plan from current pose. So I try to set start pose of my robot to another pose.

I followed http://docs.ros.org/indigo/api/moveit... , and used setStartState() to change robot start pose.

robot_state::RobotState start_state(*group.getCurrentState());
geometry_msgs::Pose start_pose2;
start_pose2.orientation.w = 1.0;
start_pose2.position.x = 0.55;
start_pose2.position.y = -0.05;
start_pose2.position.z = 0.8;
const robot_state::JointModelGroup *joint_model_group =
                start_state.getJointModelGroup(group.getName());
start_state.setFromIK(joint_model_group, start_pose2);
group.setStartState(start_state);

But, I found setFromIK() always return false and could not find IK solution.

Is there any problem in this program? Or is there other method to set start pose of robot? Thank you very much.

2016-11-07 21:26:24 -0500 asked a question How to set start state using setStartState() in moveit

I do not want my robot plan from current pose. So I try to set start pose of my robot to another pose.

I followed http://docs.ros.org/indigo/api/moveit... , and used setStartState() to change robot start pose.

But, I found the start state was not changed after setStartState().

robot_state::RobotState start_state(*group.getCurrentState());
geometry_msgs::Pose start_pose2;
start_pose2.orientation.w = 1.0;
start_pose2.position.x = 0.55;
start_pose2.position.y = -0.05;
start_pose2.position.z = 0.8;
const robot_state::JointModelGroup *joint_model_group =
                start_state.getJointModelGroup(group.getName());
start_state.setFromIK(joint_model_group, start_pose2);
group.setStartState(start_state);

So, how could I change the start pose? Thank you very much.

2016-10-08 02:15:50 -0500 received badge  Notable Question (source)
2016-05-13 04:38:51 -0500 received badge  Popular Question (source)
2016-04-28 01:48:56 -0500 received badge  Enthusiast
2016-04-26 03:20:17 -0500 asked a question How to control backhoff EK1100 and EL2004 using ethercat

Hello, I want to control backhoff EK1100 and EL2004 using ethercat. I found ethercat packages--rtt_soem. But there are not many tutorials about how to use these packages. Could anyone tell me what should I do? Thank you!

Note: slaveinfo

image description

2016-04-26 03:05:55 -0500 received badge  Famous Question (source)
2014-04-30 01:20:54 -0500 received badge  Notable Question (source)
2014-04-30 01:20:54 -0500 received badge  Famous Question (source)
2014-04-30 01:20:54 -0500 received badge  Popular Question (source)
2014-01-28 17:28:31 -0500 marked best answer Can I install ros into a ARM chip?

I have a ARM A9 chip, and i can run a ubuntu in the chip . So can i install the ROS into the chip?

2013-11-12 22:35:33 -0500 marked best answer how to link openni library through the "CMakeLists.txt" file

I have installed ROS groovy and openni library in the ARM chip. Now I want to use openni library fouction , but I do not know how to link openni library through the "CMakeLists.txt" file. I used "target_link_libraries(${PROJECT_NAME} OpenNI)",but it can not link openni founction.Who can tell me how to link openni and write cmake file?

2013-10-21 14:13:38 -0500 received badge  Notable Question (source)
2013-07-30 12:16:25 -0500 received badge  Popular Question (source)
2013-07-27 23:29:29 -0500 asked a question How to generate imu data?

My Robot has a Gyro and an Accelerometer, so how can I generate imu data? And where can I find a C++ example? Thank you !

2013-06-25 15:46:41 -0500 commented answer How to troubleshoot network delay

Think you very much , I will try it!

2013-06-24 17:21:57 -0500 asked a question How to troubleshoot network delay

My robot sends kinect XYZ and RGB data to PC through wifi. The amount of data for each frame is about 700KB, but I can only send 3 frames every second. If I send more frame , the network will be delay heavily. Is this normal?

2013-05-13 04:19:10 -0500 received badge  Famous Question (source)
2013-04-05 21:48:01 -0500 received badge  Famous Question (source)
2013-04-01 02:43:33 -0500 received badge  Famous Question (source)
2013-03-09 16:42:58 -0500 received badge  Notable Question (source)
2013-03-08 07:15:35 -0500 received badge  Popular Question (source)
2013-03-08 04:53:50 -0500 received badge  Nice Question (source)
2013-03-08 00:52:51 -0500 received badge  Student (source)
2013-03-08 00:49:36 -0500 asked a question How to produce PointCloud2 from original data with kinect

I use ros-comm in a ARM chip. Because the package "openni_camera" can not work in the ARM chip, so I have to get kinect data using openni library. Then I send the data to the PC ,and want to prdouce the PointCloud2 from these original data. How this should be to do? My PC also has ROS.

This is my code to produce original data with kinect:

 #include <XnCppWrapper.h>  
 #include <stdio.h>  
 using namespace xn;  
 /**  
 * use  1.create object 2.set output mode 3.initilization 4.update and processing  
 * ex.. 1.DepthmapPointCloud cloud; 2.cloud.setOutputMode(getDefaultOutputMode());      3.cloud.init(); 4. ... ; 
 */  

 class DepthmapPointCloud      
 {  
  public:  
DepthmapPointCloud(Context &contex, DepthGenerator &depthGenerator)  
    : m_hContex(contex), m_hDepthGenerator(depthGenerator), m_nStatus(XN_STATUS_OK),  
        m_pProjecttiveCloud(0), m_pRealworldCloud(0) {}
~DepthmapPointCloud()  
{  
    stop();  
}  
void init();  
void stop();  
void setOutputMode(const XnMapOutputMode &outputMode);  
void updataPointCloud();        // updata the point cloud datas   
inline XnPoint3D* getPointCloudData()  
{  
    return m_pRealworldCloud;  
}  
inline const XnUInt32 getPointCloudNum() const  
{  
    return m_nOutputMode.nXRes*m_nOutputMode.nYRes;  
}  
inline const XnMapOutputMode& getXYRes() const   
{  
    return m_nOutputMode;  
}  
inline const XnMapOutputMode getDefaultOutputMode()  
{  
    // set the depth map output mode  
    XnMapOutputMode outputMode = {XN_VGA_X_RES, XN_VGA_Y_RES, 30};  
    return outputMode;  
}  
/**  
* test: return projective point cloud data 
*/  
inline XnPoint3D* getRawPointData()  
{  
    return m_pProjecttiveCloud;  
}  
/**  
* test: get field of view 
*/  
inline void getFieldofView(XnFieldOfView &FOV)const  
{  
    m_hDepthGenerator.GetFieldOfView(FOV);  
}  

private:  
Context &m_hContex;  
DepthGenerator &m_hDepthGenerator;  
XnStatus m_nStatus;  
XnMapOutputMode m_nOutputMode;  
XnPoint3D *m_pProjecttiveCloud;  
XnPoint3D *m_pRealworldCloud;  

inline void printError()  
{  
    if (m_nStatus != XN_STATUS_OK)  
    {  
        printf("Error: %s", xnGetStatusString(m_nStatus));  
        exit(-1);  
    }  
}  
DepthmapPointCloud(const DepthmapPointCloud &rhs);  // don't define copy constructor  
DepthmapPointCloud& operator=(const DepthmapPointCloud &rhs); // don't define assignment operator  
};  

void DepthmapPointCloud::setOutputMode(const XnMapOutputMode &outputMode)  
{  
m_nOutputMode.nFPS = outputMode.nFPS;  
m_nOutputMode.nXRes= outputMode.nXRes;  
m_nOutputMode.nYRes = outputMode.nYRes;  
}  

void DepthmapPointCloud::init()  
{  
m_nStatus = m_hContex.Init();  
printError();  
m_nStatus = m_hDepthGenerator.Create(m_hContex);  
printError();  
// set output mode  
m_nStatus = m_hDepthGenerator.SetMapOutputMode(m_nOutputMode);  
printError();  
// start generating  
m_nStatus = m_hContex.StartGeneratingAll();  
printError();  
// allocate memory to projective point cloud and real world point cloud  
m_pProjecttiveCloud = new XnPoint3D[getPointCloudNum()];  
m_pRealworldCloud = new XnPoint3D[getPointCloudNum()];  
}  

void DepthmapPointCloud::stop()  
{  
m_hContex.Release();  
delete [] m_pProjecttiveCloud;  
delete [] m_pRealworldCloud;  
}  

void DepthmapPointCloud::updataPointCloud()  
{  
try  
{  
    // update to next frame data  
    m_nStatus = m_hContex.WaitOneUpdateAll(m_hDepthGenerator);  
    // printf("DataSize: %d\n", m_hDepthGenerator.GetDataSize());       // test  
    // store depthmap data to projective cloudpoint data  
    XnUInt32 index, shiftStep; 
    for (XnUInt32 row=0; row<m_nOutputMode.nYRes; ++row)  
    {  
        shiftStep = row*m_nOutputMode.nXRes;  
        for (XnUInt32 column=0; column<m_nOutputMode.nXRes; ++column)  
        {  
            index = shiftStep + column;  
            m_pProjecttiveCloud[index].X = (XnFloat)column;  
            m_pProjecttiveCloud[index].Y = (XnFloat)row;  
            m_pProjecttiveCloud[index].Z = m_hDepthGenerator.GetDepthMap()[index]; //mm  
        }  
    }  
    if (m_nStatus != XN_STATUS_OK) throw m_nStatus;  
    // convert projective pointcloud to real world pointcloud  
    m_hDepthGenerator.ConvertProjectiveToRealWorld(m_nOutputMode.nXRes*m_nOutputMode.nYRes, m_pProjecttiveCloud, m_pRealworldCloud);  

    for (XnUInt32 row=0; row<m_nOutputMode.nYRes; ++row)  
    {  
        shiftStep = row*m_nOutputMode.nXRes;  
        for (XnUInt32 column=0; column<m_nOutputMode.nXRes; ++column)  
        {  
            index = shiftStep + column;    
            printf("%f\t%f\t%f\n",m_pRealworldCloud[index].X,m_pRealworldCloud[index].Y,m_pRealworldCloud[index].Z);
        }  
    }
}  
catch (...)  
{  
    printError();  
    stop();  
}  
}
2013-03-08 00:32:29 -0500 received badge  Notable Question (source)
2013-03-03 13:29:59 -0500 received badge  Scholar (source)
2013-02-28 00:05:03 -0500 received badge  Popular Question (source)