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

djano_p's profile - activity

2016-04-12 08:23:58 -0500 received badge  Famous Question (source)
2015-07-29 01:02:01 -0500 received badge  Notable Question (source)
2015-03-30 04:37:08 -0500 received badge  Popular Question (source)
2015-03-29 18:56:17 -0500 asked a question Error for catkin_make even after adding target_link_libraries

Hi all,

I went through many posts and found that by adding target_link_libraries the error which looks like following, stops.

CMakeFiles/visual_par.dir/src/visual_par.cpp.o: In function `main':
visual_par.cpp:(.text+0x55): undefined reference to `ros::init(int&, char**, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
visual_par.cpp:(.text+0x9f): undefined reference to `ros::NodeHandle::NodeHandle(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)'
visual_par.cpp:(.text+0xc6): undefined reference to `ros::NodeHandle::~NodeHandle()'
visual_par.cpp:(.text+0x123): undefined reference to `ros::NodeHandle::~NodeHandle()'
visual_par.cpp:(.text+0x151): undefined reference to `ros::NodeHandle::~NodeHandle()'
collect2: ld returned 1 exit status
make[2]: *** [/home/parshad/hydro_workspace/devel/lib/visual_par/visual_par] Error 1
make[1]: *** [visual_par/CMakeFiles/visual_par.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

However I am still getting the error.

CMakefile:

cmake_minimum_required(VERSION 2.8.3)
project(visual_par)

find_package(catkin REQUIRED COMPONENTS roscpp visualization_msgs)

catkin_package(
#  INCLUDE_DIRS include
  CATKIN_DEPENDS roscpp visualization_msgs
)

  ${catkin_INCLUDE_DIRS}
)

add_executable(visual_par src/visual_par.cpp)
target_link_libraries(visual_par ${catkin_LIBRARIES})

package.xml:

<?xml version="1.0"?>
<package>
  <name>visual_par</name>
  <version>0.0.0</version>
  <description>The visual_par package</description>

  <maintainer email="name@todo.todo">parshad</maintainer>


  <license>TODO</license>
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>visualization_msgs</build_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>visualization_msgs</run_depend>


  <export>
  </export>
</package>

I am trying to run following tutorial on visual markers:

#include <ros/ros.h>
#include <visualization_msgs/Marker.h>

#include <cmath>

int main( int argc, char** argv )
{
  ros::init(argc, argv, "visual_par");
  ros::NodeHandle n;
  ros::Publisher marker_pub = n.advertise<visualization_msgs::Marker>("visualization_marker", 10);

  ros::Rate r(30);

  float f = 0.0;
  while (ros::ok())
  {

    visualization_msgs::Marker points, line_strip, line_list;
    points.header.frame_id = line_strip.header.frame_id = line_list.header.frame_id = "/my_frame";
    points.header.stamp = line_strip.header.stamp = line_list.header.stamp = ros::Time::now();
    points.ns = line_strip.ns = line_list.ns = "points_and_lines";
    points.action = line_strip.action = line_list.action = visualization_msgs::Marker::ADD;
    points.pose.orientation.w = line_strip.pose.orientation.w = line_list.pose.orientation.w = 1.0;



    points.id = 0;
    line_strip.id = 1;
    line_list.id = 2;

    points.type = visualization_msgs::Marker::POINTS;
    line_strip.type = visualization_msgs::Marker::LINE_STRIP;
    line_list.type = visualization_msgs::Marker::LINE_LIST;

    // POINTS markers use x and y scale for width/height respectively
    points.scale.x = 0.2;
    points.scale.y = 0.2;

    // LINE_STRIP/LINE_LIST markers use only the x component of scale, for the line width
    line_strip.scale.x = 0.1;
    line_list.scale.x = 0.1;



    // Points are green
    points.color.g = 1.0f;
    points.color.a = 1.0;

    // Line strip is blue
    line_strip.color.b = 1.0;
    line_strip.color.a = 1.0;

    // Line list is red
    line_list.color.r = 1.0;
    line_list.color.a ...
(more)
2015-03-25 07:07:00 -0500 received badge  Notable Question (source)
2015-03-25 07:07:00 -0500 received badge  Famous Question (source)
2014-06-17 23:39:20 -0500 received badge  Popular Question (source)
2014-06-17 15:02:22 -0500 received badge  Student (source)
2014-06-17 14:51:09 -0500 answered a question Partial conversion from .urdf.xacro to urdf

(ignore htp, it is http in actual file)

base.urdf.xacro is as follows:

<robot xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="htp://ros.org/wiki/xacro"> <xacro:include filename="$(find rob_description_rave)/urdf/base/base_rev.transmission.xacro"/> <xacro:property name="M_PI" value="3.1415926535897931"/> <xacro:macro name="rob_base_v0" &gt;="" <joint="" name="base_rev_joint" type="continuous"> <origin xyz="0 0 0" rpy="0 0 0"/> <axis xyz="0 0 1"/> <dynamics damping="1" friction="1"/> <parent link="base_transy_link"/> <child link="base_link"/> </joint> <link name="base_link"> <inertial> <mass value="200"/> <origin xyz="0 0 0"/> <inertia ixx="10." ixy="-0." ixz="0." iyy="10." iyz="-0." izz="10."/> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://rob_description_rave/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="LightGrey"> <color rgba="0. 1.0 0. 0.6"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://rob_description_rave/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> <surface> <friction> <ode mu="0" mu2="0" fdir1="0 0 0" slip1="1" slip2="1"/> </friction> </surface> </collision> </link> <gazebo reference="base_link"> <material>Gazebo/Grey</material> <turngravityoff>true</turngravityoff> </gazebo> <xacro:base_rev_transmission_v0/> </xacro:macro> </robot>

//-----------------------------------------------//

base_rev.transmission.xacro

<robot xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="htp://ros.org/wiki/xacro"> <xacro:macro name="base_rev_transmission_v0"> <transmission type="pr2_mechanism_model/SimpleTransmission" name="base_rev_trans"> <actuator name="base_rev_motor"/> <joint name="base_rev_joint"/> <mechanicalreduction>1.0</mechanicalreduction> <motortorqueconstant>1.0</motortorqueconstant> </transmission> </xacro:macro> </robot>

/-----------------------------------/

I am trying to convert base.urdf.xacro to base.urdf.

base.urdf is as follows:

<robot xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="htp://ros.org/wiki/xacro"> </robot>

2014-06-17 13:21:17 -0500 commented question Partial conversion from .urdf.xacro to urdf

please ignore the http, i have put only htp to post the question.

2014-06-17 13:20:44 -0500 asked a question Partial conversion from .urdf.xacro to urdf

I have a .urdf.xacro files to be converted to urdf files. The problem is it is partially converted. I have used the following command:

rosrun xacro xacro.py <name_of_the_file>.urdf.xacro > <name_of_the_new_files>.urdf

The file, <name_of_the_new_file>.urdf only has following in it:

<robot xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="htp://ros.org/wiki/xacro"> </robot>

There are other parameters including xacro:include, xacro:property and xacro:macro following the the <robot xmlns=""> in the urdf.xacro file.

There is no error while parsing. I tried on various laptops too. I have fuerte and groovy installed and I have directed bashrc to fuerte.

What could be the problem ?