Ask Your Question

F.Brosseau's profile - activity

2019-05-30 13:52:59 -0500 received badge  Notable Question (source)
2019-05-30 13:52:59 -0500 received badge  Popular Question (source)
2019-05-30 13:52:59 -0500 received badge  Famous Question (source)
2019-03-01 12:36:43 -0500 marked best answer Help with xacro default values

Hello everybody,

I have seen an interesting tool that I wanted to use : default values for parameters in xacro

http://wiki.ros.org/xacro#Default_par...

But when I am trying to use it, the model can't be loaded. There is some test that I made :

<xacro:macro name="lidar" params="lidarName x y z roll pitch yaw min_angle:=-2.36 max_angle:=2.36">

invalid parameter min_angle

<xacro:macro name="lidar" params="lidarName x y z roll pitch yaw min_angle:='-2.36' max_angle:='2.36'">

invalid parameter min_angle

<xacro:macro name="lidar" params="lidarName:=lms x:=0.0 y:=0.0 z:=0.0 roll:=0.0 pitch:=0.0 yaw:=0.0 min_angle:=-2.36 max_angle:=2.36">

Invalid parameter "roll"

This model works perfectly when I don't try to use default values.

I am using ROS indigo 1.11.20.

There is my questions :

Do i need to set a default value for each parameter ?

Is there an obvious mistake that I am missing in the declaration of my macro ?

Am I running a ROS version that supports this xacro default values ?

Thanks in advance

2019-03-01 07:59:02 -0500 received badge  Notable Question (source)
2019-03-01 07:59:02 -0500 received badge  Famous Question (source)
2018-11-26 11:11:05 -0500 received badge  Famous Question (source)
2018-07-10 07:08:42 -0500 received badge  Popular Question (source)
2018-07-10 07:08:42 -0500 received badge  Notable Question (source)
2018-03-28 04:05:39 -0500 received badge  Favorite Question (source)
2018-02-15 02:07:08 -0500 answered a question Why does my robot model fall in Gazebo?

You can try to add some friction on your joint to make them resist the gravity force. You may need to control your join

2018-02-08 10:43:35 -0500 commented question Map is shaking while implementing the gmapping ?

check that you have only one source for your tf You can use rosrun tf view_frame to see the tf tree

2018-02-08 03:55:41 -0500 asked a question Help with xacro default values

Help with xacro default values Hello everybody, I have seen an interesting tool that I wanted to use : default values f

2017-11-04 04:06:30 -0500 received badge  Nice Answer (source)
2017-09-05 08:02:13 -0500 received badge  Good Question (source)
2017-05-02 12:06:48 -0500 received badge  Nice Question (source)
2017-04-21 07:51:09 -0500 received badge  Taxonomist
2017-04-12 06:50:59 -0500 received badge  Notable Question (source)
2016-11-24 01:08:15 -0500 received badge  Famous Question (source)
2016-10-19 15:03:53 -0500 received badge  Student (source)
2016-10-19 15:03:42 -0500 received badge  Notable Question (source)
2016-10-04 04:01:03 -0500 received badge  Famous Question (source)
2016-08-08 04:31:36 -0500 commented question How to use sensor_msgs/LaserScan's message about rangers[]

Maybe nan value is due to a value outside the min-max distance range.

To have a better understanding of laserscan message, there is the following topic with a very good answer

2016-08-05 03:14:10 -0500 answered a question add metadata to rosbag

I will answer my own question :

I use psutil instead of subprocess. There is the part of the code doing the job :

    process = psutil.Popen(["rosbag", "record", "-O",bag_filename]+topic_list)
    process.wait()
  except KeyboardInterrupt:
    process_util = psutil.Process(process.pid)
    children = process_util.get_children()
    for child_process in children:
      child_process.send_signal(signal.SIGINT)
      child_process.wait()
    process_util.send_signal(signal.SIGINT)
    process_util.wait()
2016-08-04 03:17:35 -0500 answered a question Gazebo topic publication issue within namespaced group tag

If you are using plugins in your robot's description file, you should add a parameter to your robot_description :

<param name="robot_description"
    command="$(find xacro)/xacro '$(find basicbot_description)/urdf/basicbot.xacro' robotName:=gal" />

And in your xacro files inside the plugins tags you will add :

<robotNamespace>$(arg robotName)</robotNamespace>
2016-08-03 04:15:08 -0500 asked a question add metadata to rosbag

Hello everybody,

I am trying to add ros parameters to a bag file just after the record is done.

I am writing a python script to do that and I have followed this link : http://wiki.ros.org/rosbag/Cookbook. But I didn't manage to make it work.

Nothing is added to the bag file and I have no error message .....

There is my code :

  record_args = ""
  try:
    for param in rospy.get_param_names():
      record_args += str(param + ": " + str(rospy.get_param(param))+ " | ")
    subprocess.call(["rosbag", "record", "-a", "-O", "test"])
  except KeyboardInterrupt:
    with rosbag.Bag('test.bag','a') as bag:
      dump = String(data = record_args)
      for _, _, t in bag.read_messages():
        break
      bag.write('/rosparam', dump, t-rospy.rostime.Duration(0, 1))
  finally:
    bag.close()

Thanks in advance.

2016-07-28 09:40:55 -0500 commented question Problem using a lidar sensor in gazebo

The gpu_ray will use your graphic card but the other will not (I don't know about the details, maybe you will have more answer about that on the gazebo version of this site).

2016-07-28 01:39:18 -0500 commented question Problem using a lidar sensor in gazebo

You can set the visualize tag to true in order to see your laserscan in Gazebo's GUI. If laser impacts don't stop on obstacle maybe you could try the laser plugin which is not using gpu -> libgazebo_ros_laser.so.

2016-07-27 03:00:10 -0500 commented answer how to turn my robot with different controllers?

For 1 : there is a tutorial here

Then you can take the diff drive plugin code and change the msg type expected : gazebo_git

2016-07-26 06:29:11 -0500 answered a question how to turn my robot with different controllers?

If you want to separate your motor's commands, you can :

  • use one plugin and change the message type expected for command topic
  • write a plugin that control only one motor. This plugin will be called for each of your motor.
  • maybe look at ros_control

With the code that you have posted :

  • maybe you can change the plugins name (conflict between two plugins having the same name)
  • your command topic expected by these plugins should probably be : /labrob/motor1/cmd_vel and /labrob/motor2/cmd_vel
2016-07-21 01:20:31 -0500 received badge  Popular Question (source)
2016-07-13 08:30:46 -0500 received badge  Notable Question (source)
2016-07-13 08:30:46 -0500 received badge  Famous Question (source)
2016-07-13 08:30:46 -0500 received badge  Popular Question (source)
2016-07-11 03:07:12 -0500 asked a question yaml substitution

Hello everyone,

I would like to set a list of map for a node using a yaml file. I see that there is a subst_value in the rosparam tag but I don't know how to use it and how it's working.

What I have at the moment :

In a launch file :

<arg name="site_path" value="$(env PWD)"/>
<rosparam command="load" file="$(env PWD)/map/map_list.yaml" param="$(arg site_path)" subst_value="true" />

In a yaml file :

 foo:
  map_list:
    "map1": "$(arg site_path)/map/map1.map"
    "map2": "$(arg site_path)/map/map2.map"

The result I have :

/absolute/path/to/foo/map_list/map1: $(arg site_path)/map/map1.map
/absolute/path/to/foo/map_list/map2: $(arg site_path)/map/map2.map

What I want :

/foo/map_list/map1: /absolute/path/to/map/map1.map
/foo/map_list/map2: /absolute/path/to/map/map2.map

Is it possible to do that ?

2016-06-21 07:49:04 -0500 commented question How do I write a C++ code to record variable location of robot in rosbag file?

Yes it's another way to communicate with ROS nodes. Services allow you to communicate with nodes at a given time.

You can look to the ros wiki for more information : http://wiki.ros.org/ROS/Tutorials/WritingServiceClient(c%2B%2B))

2016-06-21 04:05:35 -0500 commented question How do I write a C++ code to record variable location of robot in rosbag file?

You can use a service to close the file when you want.

2016-06-17 01:54:21 -0500 commented answer Using ROS with Docker - Unable to set ROS_PACKAGE_PATH

After running the container.

We use a script to set all environment variables.

2016-06-16 02:09:58 -0500 answered a question Using ROS with Docker - Unable to set ROS_PACKAGE_PATH

I don't use ENV to set ROS_PACKAGE_PATH but export :

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/foo
2016-06-14 02:35:39 -0500 answered a question How to move any 2 robots simultaneously in gazebo?

If they have to move the same way, you can make them subscribe to the same command topic.

You can also take a look at this : http://wiki.ros.org/turtlesim#mimic. In the tutorial, it allows a robot to reproduce the movement of another one.

2016-06-14 02:30:25 -0500 answered a question Bad Python code for custom message node - eating up cpu?

Why the rospy.Rate is inside the loop ? Is the 15 Hz rate working ?

According to this link http://wiki.ros.org/rospy/Overview/Time, this line should be before the while.

2016-06-09 21:21:32 -0500 received badge  Nice Answer (source)
2016-06-09 03:38:35 -0500 answered a question Unable to publish two topics from same node

kin and msg are messages that you will send on a topic.

yourpub1.publish(msg);
yourpub2.publish(kin);

Can you post more sample of your code ?

2016-06-09 02:00:27 -0500 answered a question Ros stereo image proc with two USB Webcams

Maybe you should look at this package : http://wiki.ros.org/usb_cam

It will allow you to have a camera topic in output.

2016-06-08 02:01:44 -0500 commented question DiffDrive odometry source is missing

These warnings are not a problem.

Sorry my bad, I made a mistake. It's odometrySource.

You can check what are the parameters of the plugins by checking the source code : git_gazebo

2016-06-07 07:20:21 -0500 commented question DiffDrive odometry source is missing

If you have a problem with a ros node and simulation, maybe you can use rqt_graph tool to see if all topics are correctly mapped.

2016-06-07 07:13:02 -0500 commented question DiffDrive odometry source is missing

Do you have an error ? These two warnings just tell you that you don't use the odometrySource and publishTf tags so it will use default values. Values for odometrySource are WORLD or ENCODER. You can set it by adding <odometrysource>WORLD</odometrysource> for example.

2016-06-06 08:23:54 -0500 commented question Adding modelState to gazebo simulator using python node