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

cangjiaxuan's profile - activity

2022-01-12 01:23:18 -0500 received badge  Famous Question (source)
2020-10-19 21:02:36 -0500 received badge  Famous Question (source)
2019-01-28 06:27:59 -0500 received badge  Notable Question (source)
2019-01-28 06:27:59 -0500 received badge  Popular Question (source)
2018-06-27 07:46:26 -0500 received badge  Notable Question (source)
2017-05-12 06:34:35 -0500 received badge  Famous Question (source)
2017-05-12 06:34:35 -0500 received badge  Notable Question (source)
2017-05-12 06:34:35 -0500 received badge  Popular Question (source)
2017-03-27 07:19:05 -0500 received badge  Popular Question (source)
2017-03-16 11:11:13 -0500 received badge  Famous Question (source)
2016-11-05 07:43:45 -0500 commented question Problem loading Stl in rviz

Hi, I meet similar problem like you. I draw a model file using sketchup, and convert it to stl using mashlab. This model file can be displayed in gazebo but get this "UnboundLocalError: local variable 'slider' referenced before assignment" error when loading in rviz.

2016-09-19 08:50:32 -0500 asked a question Problems with the old moveit! tutorials about benchmark tools

Hi there,

I'm new to moveit!, and currently trying to use the benchmark tool to do reachability analysis.

I find some old tutorials at http://moveit.ros.org/doxygen/moveit_... and http://moveit.ros.org/wiki/Benchmarking

But what I get is 404 not found. Does these tutorials still exist? Or would anyone provide me with some documents about how to use the benchmark tools?

Thanks in advance.

2016-09-07 21:58:51 -0500 asked a question Problem about the rpy at joint element in urdf model

I write a very simple two link arm model, but I meet some strange problem.

Here is my model:

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

    <material name="orange">
        <color rgba="${255/255} ${108/255} ${10/255} 1.0"/>
    </material>

    <gazebo reference="link1">
        <material>Gazebo/Orange</material>
    </gazebo>

    <gazebo reference="link2">
        <material>Gazebo/Orange</material>
    </gazebo>


    <xacro:property name="height1" value="0.2" />
    <xacro:property name="height2" value="0.1" />
    <xacro:property name="width" value="0.02" />
    <xacro:property name="mass" value="1" />
    <xacro:property name="PI" value="3.14" />

    <link name="world"/>

    <joint name="link1_to_world" type="fixed">
        <parent link="world"/>
        <child link="link1"/>
    </joint>

    <link name="link1">
        <visual>
            <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
            <geometry>
                <box size="${width} ${width} ${height1}"/>
            </geometry>
            <material name="orange"/>
        </visual>

        <collision>
            <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
            <geometry>
                <box size="${width} ${width} ${height1}"/>
            </geometry>
        </collision>

        <inertial>
            <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
            <mass value="${mass}"/>
            <inertia 
                ixx="${height1*height1*mass/12}" ixy="0" ixz="0" 
                iyy="0" iyz="0"  
                izz="${height1*height1*mass/12}" />
        </inertial>
    </link>

<!--
    <joint name="link1_to_link2" type="continuous">
        <parent link="link1"/>
        <child link="link2"/>
        <origin xyz="${0.5*height2-0.5*width} 0 ${height1+0.5*width}" rpy="0 ${0.5*PI} 0"/>
        <axis xyz="0 1 0"/>
        <dynamics damping="0.7"/>
    </joint>
-->
    <joint name="link1_to_link2" type="continuous">
        <parent link="link1"/>
        <child link="link2"/>
        <origin xyz="${0.5*height2-0.5*width} 0 ${height1+0.5*width}" rpy="${0.5*PI} 0 0"/>
        <axis xyz="0 1 0"/>
        <dynamics damping="0.7"/>
    </joint>

    <link name="link2">

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="${width} ${width} ${height2}"/>
            </geometry>
            <material name="orange"/>
        </visual>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="${width} ${width} ${height2}"/>
            </geometry>
        </collision>

        <inertial>
            <origin xyz="0 0 0 " rpy="0 0 0"/>
            <mass value="${mass}"/>
            <inertia
                ixx="${height2*height2*mass/12}" ixy="0" ixz="0"
                iyy="0" iyz="0"
                izz="${height2*height2*mass/12}"
                />
        </inertial>
    </link>

</robot>

When I use the model in the comment every thing is fine, but when I use the model now, it appears that the second link would go below the first link. Why does this happens?

2016-07-10 14:45:14 -0500 received badge  Notable Question (source)
2016-07-09 21:53:05 -0500 commented answer Use gdb for ros control plugin

Hi, I tied several ways and finally I can use gdb to debug my plugin. I write my experience below.

2016-07-09 21:51:10 -0500 answered a question Use gdb for ros control plugin

I find two ways to solve this problem.

The first one is simple, just add debug:=true at the end of the command line when start gazebo. After loading the controller, if there is something wrong happened the program would stop and you could use gdb to debug the program.

For example:

roslaunch rrbot_gazebo rrbot_world.launch debug:=true

(rrbot_gazebo is an example package in the gazebo tutorial)

The second way is a little tricky, the main idea is to use gdb -p "pid". So one should first use ps -auxw | grep gzserver to locate the pid of gazebo. Then use gdb -p "pid" to start gdb. But the gdb would start with some sleep function. So we should use command finish to finish the sleep process until we get into run() function. Then we can set breakpoints and debug the program.

2016-06-30 09:25:18 -0500 received badge  Popular Question (source)
2016-06-29 04:18:12 -0500 commented answer Use gdb for ros control plugin

Great! I think I got your idea, I would try it later.

2016-06-29 04:18:12 -0500 received badge  Commentator
2016-06-28 22:23:21 -0500 commented question Use gdb for ros control plugin

Thank you for your comment, now I know why I have such error. For debugging a controller in gdb, would you mind to describe it in more detail or provides me with some link solving similar question? Thanks again!

Erli

2016-06-27 21:51:17 -0500 asked a question Use gdb for ros control plugin

Hi all,

Somebody who have used gdb to debug a ros control plugin please share some experience with me:)

I added the "launch-prefix="gdb -ex run --args" " attribute in the node tag of my launch file.

But when roslaunch the launch file here is what I got

"/opt/ros/indigo/lib/controller_manager/spawner": not in executable format: File format not recognized
Starting program:  joint1_effort_controller __name:=controller_spawner __log:=/home/lc/.ros/log/7a02b5fc-3c75-11e6-8071-0023248137eb/rrbot-controller_spawner-1.log
No executable file specified.

My gdb version is 7.7.1 and my ubuntu version is 14.04, my ros version is indigo.

And by the way if don't use gdb, is there any other debug tools for debugging a plugin?

Thanks in advance

Erli

2016-06-25 10:40:44 -0500 received badge  Teacher (source)
2016-06-25 10:40:44 -0500 received badge  Self-Learner (source)
2016-06-25 10:18:49 -0500 answered a question no factory exists problem with Gazebo ros control tutorial

I solved this problem just several minutes ago. It turns out the error appears because the .so file is collapsed. So I download the source code from git and re-generate the .so file use catkin_make. The last step would be copy the .so file to /ros/<dist>/lib folder, and problem solved. And then PROMBLEM SOLVED!

2016-06-25 08:45:29 -0500 asked a question no factory exists problem with Gazebo ros control tutorial

Hi there,

My ros distribution is indigo and my ubuntu distribution is 14.04.

I'm currently learning ros control. And it speed learning curve really makes me frustrated.

Here is my question, I tried the Gazebo ros control tutorial at http://gazebosim.org/tutorials/?tut=r... .

When typing "roslaunch rrbot_control rrbot_control.launch" it worked at the first time. But things get weird when I come back several days later( Accurately yesterday..... ). I got errors when loading the control_plugin.

But when I call the service as the third error suggested I find the effort_controllers/JointPositionController exist. And when I type "rospack find effort_controllers" I can find the package under ros/indigo/share/ Furthermore at file effort_controller_plugins.xml it actually contain:

<class> name="effort_controllers/JointPositionController" type="effort_controllers::JointPositionController" base_class_type="controller_interface::ControllerBase"> <description> The JointPositionController tracks position commands. It expects a EffortJointInterface type of hardware interface. </description> </class>

I try to remove and re-install the effort_controllers use "apt-get" several times but the errors still exist.

Please help me out of this.

Thanks in advance. Erli

2016-04-14 09:20:55 -0500 received badge  Famous Question (source)
2015-11-17 13:22:32 -0500 received badge  Famous Question (source)
2015-11-12 08:00:51 -0500 commented question Problem with converting rosmake package to catkin package

:(. I remove the build/ and devel/ but unfortunate nothing changed, I still got the same error message. I check the devel/ folder there are no header file from mathlib generated there, I think this is the reason why seds can't find the .h file. Anyway thank you for your help:)

2015-11-12 07:29:42 -0500 commented question Problem with converting rosmake package to catkin package

Hi, I have done those changes recommended.

2015-11-12 00:23:07 -0500 received badge  Enthusiast
2015-11-11 19:02:43 -0500 commented answer Problem with converting rosmake package to catkin package

I put the catkin_package() element just after include. I think that's what you mean.

2015-11-11 19:01:05 -0500 commented answer Problem with converting rosmake package to catkin package

But I get the feeling that I'm getting closer to the right answer:)

2015-11-11 19:00:12 -0500 commented answer Problem with converting rosmake package to catkin package

Thank you. I do the change, but still catkin_make says

In file included from /home/lc/ros_ws/src/SEDS/src/GMR.cpp:31:0:
/home/lc/ros_ws/src/SEDS/include/GMR.h:28:28: fatal error: mathlib/Mathlib.h: No such file or directory
 #include<mathlib/Mathlib.h>
2015-11-11 18:52:28 -0500 edited question Problem with converting rosmake package to catkin package

replace the old CMakeList files with new files, update the layout(thank you dornhege), add the layout with tree command

I'm currently working with a project with two rosmake package.

Both package contains several .cpp files and .h files but there are no main function in any those cpp files, and none of this file have ros functions like ros::initial() blah blah, so they are just ordinary cpp files.

I successfully convert the first package into a catkin package(follow http://wiki.ros.org/catkin/migrating_... and the catkin 0.6.15 document) then I run the catkin_make at my work space. Everything works well, I got a lot of .cpp.o files and a libmathlib.so (mathlib is the name of this package) file.

And in the second package, I want to use the first package. But here comes the problem, I convert the menifest.xml and CMakeList.txt into catkin format file, but as I catkin_make this package

This problem shows up

In file included from /home/lc/ros_ws/src/SEDS/src/GMR.cpp:31:0:
/home/lc/ros_ws/src/SEDS/include/GMR.h:28:28: fatal error: mathlib/Mathlib.h: No such file or directory
 #include<mathlib/Mathlib.h>

Thank you for your reading, and does any one know how to solve this problem? If there are any extra information needed for this problem, please tell me.

CmakeLists: mathlib:

cmake_minimum_required(VERSION 2.8.3)
project(mathlib)

find_package(catkin REQUIRED COMPONENTS roscpp)

include_directories(include ${catkin_INCLUDE_DIRS})

catkin_package(CATKIN_DEPENDS roscpp
               INCLUDE_DIRS include
               LIBRARIES ${PROJECT_NAME})

set(THE_SOURCE_FILES
    src/Differentiator.cpp
    src/GradientDescent.cpp
    src/IKGroupSolver.cpp
    src/IKSubSolver.cpp
    src/Macros.cpp
    src/MathLibCommon.cpp
    src/MathLib.cpp
    src/Matrix3.cpp
    src/Matrix4.cpp
    src/Matrix.cpp
    src/ReferenceFrame.cpp
    src/Regression.cpp
    src/SpatialForce.cpp
    src/SpatialFrame.cpp
    src/SpatialInertia.cpp
    src/SpatialMatrix.cpp
    src/SpatialVector.cpp
    src/SpatialVelocity.cpp
    src/TMatrix.cpp
    src/TVector.cpp
    src/Vector3.cpp
    src/Vector.cpp
    )

add_library(${PROJECT_NAME} ${THE_SOURCE_FILES} )
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencpp)


install(TARGETS ${PROJECT_NAME}
        ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})

install(DIRECTORY include/${PROJECT_NAME}
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
    FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")

Another package(seds):

cmake_minimum_required(VERSION 2.8.3)
project(seds)

find_package(catkin REQUIRED COMPONENTS roscpp mathlib)


include_directories(include ${catkin_INCLUDE_DIRS})

catkin_package(CATKIN_DEPENDS mathlib
           DEPENDS roscpp
               INCLUDE_DIRS include
               LIBRARIES seds
)

set(THE_SOURCE_FILES
    src/GMR.cpp
    )


add_library(seds ${THE_SOURCE_FILES})
target_link_libraries(seds ${catkin_LIBRARIES})

install(TARGETS seds
        ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})

Layout of mine two packages mathlib package

    .
    ├── CMakeLists.txt
    ├── include
    │   └── mathlib
    │       ├── Differentiator.h
    │       ├── GradientDescent.h
    │       ├── IKGroupSolver.h
    │       ├── IKSubSolver.h
    │       ├── Macros.h
    │       ├── MathLibCommon.h
    │       ├── MathLib.h
    │       ├── Matrix3.h
    │       ├── Matrix4.h
    │       ├── Matrix.h
    │       ├── ReferenceFrame.h
    │       ├── Regression.h
    │       ├── SpatialForce.h
    │       ├── SpatialFrame.h
    │       ├── SpatialInertia.h
    │       ├── SpatialMatrix.h
    │       ├── SpatialVector.h
    │       ├── SpatialVelocity.h
    │       ├── TMatrix.h
    │       ├── tmp.txt
    │       ├── TVector.h
    │       ├── Vector3.h
    │       └── Vector.h
    ├── package.xml
    └── src
        ├── Differentiator.cpp
        ├── GradientDescent.cpp
        ├── IKGroupSolver.cpp
        ├── IKSubSolver.cpp
        ├── Macros.cpp
        ├── MathLibCommon.cpp
        ├── MathLib.cpp
        ├── Matrix3.cpp
        ├── Matrix4.cpp
        ├── Matrix.cpp
        ├── ReferenceFrame.cpp
        ├── Regression.cpp
        ├── SpatialForce.cpp
        ├── SpatialFrame.cpp
        ├── SpatialInertia.cpp
        ├── SpatialMatrix.cpp ...
(more)
2015-11-10 23:27:04 -0500 received badge  Notable Question (source)