Open k-quinted opened 6 years ago
The issue with the missing files is because the message files need to compiled before the rest, but apparently aren't being.
The model is moving itself probably because of some tests I left behind.
I ask that you forgive me, for I don't have a lot of time right now to take a good look at this. I realized I already have forgotten a lot about ROS just by looking at the previous issue.
Hello!
I have started working with this repository and I think I have the solution for the message compiling problem. I know it has been more than a month since the last comment but maybe this could be useful for someone.
The solution is really simple. To be sure that the message files are compiled before the rest, you only need to add this just after the target_link_libraries( ):
add_dependencies(name_of_exe package_name_generate_messages_cpp)
So this is how the #Build# part of my CMakeLists.txt actually looks like:
###########
## Build ##
###########
include_directories( include
${catkin_INCLUDE_DIRS}
${Eigen3_INCLUDE_DIRS}
)
add_executable(${PROJECT_NAME}_kinematics src/kinematics.cpp)
target_link_libraries(
${PROJECT_NAME}_kinematics
${catkin_LIBRARIES}
${orocos-kdl_LIBRARIES}
${kdl_parser_LIBRARIES}
)
add_dependencies(${PROJECT_NAME}_kinematics open_base_generate_messages_cpp)
add_executable(${PROJECT_NAME}_odometry src/odometry.cpp)
target_link_libraries(
${PROJECT_NAME}_odometry
${catkin_LIBRARIES}
${kdl_parser_LIBRARIES}
)
add_dependencies(${PROJECT_NAME}_odometry open_base_generate_messages_cpp)
add_executable(${PROJECT_NAME}_sensor_encoder src/sensor/encoder.cpp)
target_link_libraries(
${PROJECT_NAME}_sensor_encoder
${catkin_LIBRARIES}
)
add_dependencies(${PROJECT_NAME}_sensor_encoder open_base_generate_messages_cpp)
add_executable(${PROJECT_NAME}_main src/main.cpp)
target_link_libraries(
${PROJECT_NAME}_main
${catkin_LIBRARIES}
)
add_dependencies(${PROJECT_NAME}_main open_base_generate_messages_cpp)
This work for me with Ubuntu 16.04LTS and ROS Kinetic. I hope it helps somebody!!
@AlvaroFerGar Thanks for the tip! I'll take a look into it soon-ish and update the repository if it works.
@AlvaroFerGar I've adapted the code you provided and it fixed the build order bug. Committed and pushed. Thanks!
I tested a project I had created that used this package to control a 4 joints robot. I remember clearly it was working. It failed with the same message generation problems. I fixed it with the same solution. Something must have changed in ROS while I wasn't working on it.
@k-quinted I just committed some fixes and I would like some more information from you to see if I can resolve your issues. I hadn't realized before that I didn't understood your question correctly.
The first bit about
- open_base/Velocity.h
- open_bace/FrameToFrame.h
- open_bace/KinematicsForward.h
has been fixed in b3da6f628f810b8c8de04a6a2c79256401175cff.
About
I tried to copy and launch following xacro files
How did you try to launch these files? They aren't meant to be launched directly. They are meant to be launched from *.launch
files.
About
- OpenBase/ROS/open_base/launch/gazebo description.launch
- OpenBase/ROS/open_base/launch/parameter.launch
parameter.launch
is not meant to be launched directly. It's meant to be launched from other launch files to load common parameters.gazebo description.launch
is meant only to load the robot's description in Gazebo, in order to test the description itself. It's not meant to make the robot move. To make the robot move, you can launchvelocity controller.launch
and pass messages to/open_base/command
. You probably can use other launch files to make the robot move, but I forgot how to use them.
@GuiRitter
Thank you for your reply.
My question is why the open_base model moves itself.
I was loading the model on Gazebo by gazebo description.launch. But, the robot has rotated the wheel without any input. Then, I did not launch the other launch file and control programs.
Hello. I'm working with this repository, but a i'm a beginner in ROS. When i launch the velocity controller i get this messages:
"ERROR: cannot launch node of type [open_base/open_base_odometry]: can't locate node [open_base_odometry] in package [open_base] ERROR: cannot launch node of type [open_base/open_base_kinematics]: can't locate node [open_base_kinematics] in package [open_base] ERROR: cannot launch node of type [open_base/open_base_sensor_encoder]: can't locate node [open_base_sensor_encoder] in package [open_base] ERROR: cannot launch node of type [open_base/open_base_main]: can't locate node [open_base_main] in package [open_base] [ INFO] [1534792654.451628583]: Finished loading Gazebo ROS API Plugin. [ INFO] [1534792654.452117925]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [INFO] [1534792654.465419, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller [ INFO] [1534792654.508394461]: Finished loading Gazebo ROS API Plugin. [ INFO] [1534792654.509917473]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1534792655.505918382]: Loading gazebo_ros_control plugin [ INFO] [1534792655.506032560]: Starting gazebo_ros_control plugin in namespace: /open_base [ INFO] [1534792655.506896663]: gazebo_ros_control plugin is waiting for model URDF in parameter [/open_base/robot_description] on the ROS param server. [ WARN] [1534792655.618791152]: Deprecated syntax, please prepend 'hardware_interface/' to 'EffortJointInterface' within the
@k-quinted You're welcome!
My question is why the open_base model moves itself.
When using gazebo description.launch
, it doesn't create any controllers, because the purpose of this launch file is just to test the description in Gazebo. Without controllers, the joints move freely.
To get movement out of this robot, use velocity controller.launch
and pass messages to /open_base/command
. You have two options:
rostopic pub /open_base/command
then hit Tab
a few times to autocomplete the message template and fill the values. To know what each value mean, look into the *.msg
files in the msg
folder;scripts/movement*.sh
files to your needs and run them with source scripts/movement*.sh
.@20150388 You need to install a few packages to support the controllers I used. These should do:
sudo apt-get install ros-kinetic-joint-state-controller
sudo apt-get install ros-kinetic-effort-controllers
sudo apt-get install ros-kinetic-position-controllers
I'll edit README.md
to make these things more clear. A bit right now and more later. Please let me know if you managed to get it working.
@GuiRitter
Ok.
After confirming, I will tell you.
Thank you.
Hello. First i want thank you for the help.
I tested the velocity controller.launch after install the packages and it works fine and also moving the robot publishing the open base command was working. Do you have any suggestion how to put the robot moving with the keyboard?
Thank you
Guilherme Alan Ritter notifications@github.com escreveu no dia terça, 21/08/2018 à(s) 01:38:
@k-quinted https://github.com/k-quinted You're welcome!
My question is why the open_base model moves itself.
When using gazebo description.launch, it doesn't create any controllers, because the purpose of this launch file is just to test the description in Gazebo. Without controllers, the joints move freely.
To get movement out of this robot, use velocity controller.launch and pass messages to /open_base/command. You have two options:
- Write in a terminal rostopic pub /open_base/command then hit Tab a few times to autocomplete the message template and fill the values. To know what each value mean, look into the *.msg files in the msg folder,
- Edit the scripts/movement.sh files to your needs and run them with source scripts/movement.sh.
@20150388 https://github.com/20150388 You need to install a few packages to support the controllers I used. These should do:
sudo apt-get install ros-kinetic-joint-state-controller sudo apt-get install ros-kinetic-effort-controllers sudo apt-get install ros-kinetic-position-controllers
I'll edit README.md to make these things more clear. A bit right now and more later. Please let me know if you managed to get it working.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GuiRitter/OpenBase/issues/5#issuecomment-414509946, or mute the thread https://github.com/notifications/unsubscribe-auth/AiQ3LyRviED4_IlD5X2ueWIdn21IHqdzks5uS1aLgaJpZM4U1brM .
Hi, GuiRitter.
I tried to copy the your OpenBase packages to my catkin workspace and do the catkin_make. But, in this result, I had a fatal error and no such files (the following files) ・open_base/Velocity.h ・open_bace/FrameToFrame.h ・open_bace/KinematicsForward.h So, this issue is the same problem of mashenlyl.
Also, I tried to copy and launch following xacro files. ・OpenBase/ROS/open_base/xacro/main.urdf.xacro ・OpenBase/ROS/open_base/xacro/rim.urdf.xacro ・OpenBase/ROS/open_base/xacro/roller.urdf.xacro But, the model moves itself.
I just use following launch files. So, I have not input anything. ・OpenBase/ROS/open_base/launch/gazebo description.launch ・OpenBase/ROS/open_base/launch/parameter.launch
What is the case this issue?
I use ROS Kinetic and Gazebo7.
Thanks in advance for your help.