Hi, I am following this tutorial Building a Visual Robot Model with URDF from Scratch
I am working on the third urdf file 03-origins.urdf.
After testing with the file in tutorial, I modified the position of right_leg, or changing the name of right_leg -> left_leg (included name in the joint section), these modifies are still not be updated when I ran the launch file. The robot model still look the same with the first time I ran the file or the information of the link inside robot model in Displays view on the left side of rviz is still the same.
Please tell me the steps to have my modification be updated in rviz. I did try to run catkin_make again but it did not help.
My another question is looks like rviz does not load the urdf.rviz file at all. Every time I ran, I have to add the robot model manually and I also have to set the Fixed Frame under Global Options to base_link. I tried to save the urdf configuration but it shows a dialog says "Failed to save", and ask me to save to another file.
Thank you very much.
Edit 1: From what I have right now, I do Ctrl+C to close the current roslaunch session.
Below is my modified urdf file. I changed the name of the child link to "left_leg" as well as I change the position to only shift -0.3
<?xml version="1.0"?>
<robot name="myfirst">
<link name = "base_link">
<visual>
<geometry>
<cylinder length="0.6" radius="0.2"/>
</geometry>
</visual>
</link>
<link name = "left_leg">
<visual>
<geometry>
<box size="0.6 .1 .2" />
</geometry>
<origin rpy="0 0 0" xyz="0 0 -0.3" />
</visual>
</link>
<joint name="base_to_left_leg" type="fixed">
<parent link="base_link"/>
<child link="left_leg"/>
</joint>
</robot>
The issue can come from my modified launch file. I removed the model argument.
<launch>
<arg name="gui" default="true" />
<arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz" />
<arg name="urdfconfig" default="$(find urdf_tutorial)/urdf/03-origins.urdf" />
<param name="robot_description" textfile="$(arg urdfconfig)" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />
</launch>
I did try to put it back as original launch file and I got the error
ubuntu@tegra-ubuntu:~/Documents/WorkSpaceMasteringRosRobot$ roslaunch urdf_turtorial display.launch model:=urdf/03-origins.urdf
... logging to /home/ubuntu/.ros/log/66b5c9da-7e4c-11e6-b9fc-00044b581868/roslaunch-tegra-ubuntu-16126.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
<param> tag must have one and only one of value/textfile/binfile.
The traceback for the exception was written to the log file
I also attach the screen shot of rvizScreenshot rviz.png Please notice at RobotModel > Links > right_leg
Edit 2: I used the same workspace which I already created with another project. I create the workspace folder then sub folder src. From src folder I did:
$ catkin_init_workspace
From workspace folder I did
$ catkin_make
$ echo "source ~/WorkSpaceMasteringRosRobot/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
I created the package with catkin_create_pkg. Then I created folder like urdf, rviz and launch with above files. Then I do which now I think I don't have to do that again. Am I correct?
$ catkin_make
$ echo "source ~/WorkSpaceMasteringRosRobot/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
Originally posted by Thang Nguyen on ROS Answers with karma: 93 on 2016-09-18
Post score: 1